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:
ArrayList<SomeType> list = new ArrayList<Some Type>;
list.add(SomeType1);
list.add(SomeType2);
Foo one = new Foo("->", list);
is there a way to print the format like below:
SomeType 2 -> SomeType 1
Let's say I have a SomeType class. Do I have something to do in the SomeType class?