I'm very much confused about the kind of Output I get when I pass different objects in println method. What I mean is; what the output of object in println method indicates? The following snippets may give a clearer idea about my Question.
Integer i=10;
Double d=23.45;
String s="I'm";
void display(){
System.out.println(i);
System.out.println(d);
System.out.println(s);
System.out.println(this);
}
The code of My Main method:
ObjectDemo o=new ObjectDemo();
ObjectDemo o1=new ObjectDemo();
ObjectDemo o2=new ObjectDemo();
ObjectDemo o3=new ObjectDemo();
ObjectDemo o4=new ObjectDemo();
o.display();
o1.display();
o2.display();
o3.display();
o4.display();
ANd I get the following Output:
I'm
introductoryProgs.ObjectDemo@15db9742
10
23.45
I'm
introductoryProgs.ObjectDemo@6d06d69c
10
23.45
I'm
introductoryProgs.ObjectDemo@7852e922
10
23.45
I'm
introductoryProgs.ObjectDemo@4e25154f
10
23.45
I'm
introductoryProgs.ObjectDemo@70dea4e