Monday 26 December 2016

java - How many objects are there?

String s1=new String("rahul");
s1=new String("rahul");
s1=new String("kumar");
String s2=new String("rahul");
s2=new String("rahul");
s2=new String("kumar");



// How many Objects are created?

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...