I am confused in String.It's given in the book that
string is object in
java and it is created by using the class "String".And if you write "Object ob" then only the reference of that class is created and it points to "Null",an object is created by using "new" operator,"Object ob=new Object()".
Since the objects are created by using "new" operator where the memory is allocated dynamically during run-time, how in case of string this given statement is possible "String ob="Hello",without allocating memory for it.
any help is appreciated...