Hi Pallavi,
You really dont want to have System.out.println statements in a toString method. This is a standard method in all objects that other programmers expect to have work in a standard way.
Having said that - you can put debugging code anywhere you like
before you hand in the assignment - just make sure you get rid of it before you hand it in. If you do something like:
System.out.println("DEBUG ...");
then you can do a search for the DEBUG
string before you do your final compile, and get rid of anything like that.
Regards, Andrew