I came across a very weird error that I just can\'t figure out how to solve.
A project, that compiles just fine on Windows, doesn\'t compile on Linux with the follow
I have tried your code
public class AClass {
enum Bbb {
ONE,
TWO;
}
public void aMethod(List arg) {
for (Bbb en : arg) {
switch (en) {
case ONE: System.out.println("ONE");break;
case TWO: System.out.println("TWO");break;
}
}
}
public static void main(String[] args) {
List list = new ArrayList();
list.add(Bbb.ONE);
list.add(Bbb.TWO);
new AClass().aMethod(list);
}
}
It is working fine.
I dont know the pros and cons of passing argument like this List
but atleast it is not error as much as i know in java 7