If a class doesnt override toString() method and tries to print out the object like this:
//some class
public class SomeClass1{
int x=4;
}
//another class
class DemoOftoString
{
public static void main(String[] args)
{
SomeClass1 o=new SomeClass1();
System.out.println(o);
}
}
output:SomeClass1@hex version of object's hash code
------------------------------------------
But when a collection object is called with collectionobject.toString() it returns the values...but it doesnt return classname@hex value of objects hash code..instead it return values.....
Can anyone help with this....thanks
regards,
Fardoon.