I'm using the scanner to take user input and assign it to an object. I know string is an extension of object class so it should be a simple assignment. Here is what I've tried.
string name = s.nextLine();// or s.next();
object obj = name;// or JOSN.parse(name);
Here is my code. I've put one arraylist instead another arrraylist.
trans = new List<Transition>(nos);
for (i = 0; i < 5; i++) {
List<Transition>innerList = trans.get(i);
for (j = 0; j < 5; j++){
String state = s.next();
Transition reg = innerList.get(j).add(state);
}}
The error i get is 'type mismatch cant convert type string to Transition', but Transition is just an object.