class Jatin{
int value = 9;
public static void main(String args[]){
Jatin obj = new Jatin();
String str = new String("Hello");
System.out.println(obj);//prints unique id why
System.out.println(str);//prints string value why
}
}
How to modify this code and use obj object of class Jatin to print all its data members i.e. print out the value =9. Whereas in String str sop print the value . Why?