Hello Ramya,
Please explain the answer of this question,i could not understand why A1A2A3 is printed instead of only A1 in answers.
for loop will execute below mentioned 4 lines:
a0 = a0.other(); //that means a0 = a1 ... which will print A1
a0 = a0.other(); //that means a0 = a2 ... which will print A2
a0 = a0.other(); //that means a0 = a3 ... which will print A3
a0 = a0.other(); //that means a0 = a1 ... which will print A1
Hope this will help you understanding the answer.
Regards,
Sachin Anand