0
How is it possible ? What exactly is happening behind in the code?
String str4 = new Interger().toString(); /*As strings are non-primitive types the actual way of creating an object is Classname Variablename = new Classname(); String str4 = new String(); But the above case is totally different. I want to know whether even though a string is object related it has some specific way to create an object Or usually there are more ways to create an object than the conventional way of (Classname varname = new Classname(); */
1 Answer