I have this class has constructor taking a String and a Arraylist as argument;
class Foo{
String ide;
ArrayList list;
public TypeOperator(String ide, ArrayList list){
this.ide = ide;
this.list = list;
}
}
so when I initialise the class like below:
Foo one = new Foo("boo", []);
it gives errors. Well I can do this to make it work:
ArrayList empty = new ArrayList();
Foo one = new Foo("boo", empty);
is there any reason why the first solution won't work? Or is there a way to make some changes to make it work? Thanks