Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training  
 

How many objects are created in the code below? Explain.

Ads

 
 

Share on Google+Share on Google+

Parvathambal
How many objects are created in the code below? Explain.
0 Answer(s)      5 years and 4 months ago
Posted in : Java Interview Questions

Hi,

Here is my code

public static void main(String[] args) {String s1 = "abc"; StringBuffer s2 = new StringBuffer(s1); StringBuffer s3= s2; StringBuffer s4 = new StringBuffer(s1);}
Ads
View Answers
Ads









Related Tutorials/Questions & Answers:
Advertisements