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

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

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);}
View Answers









Related Tutorials/Questions & Answers:
How many objects are created in the code below? Explain.
Please explain this code as many packages and classes are unknown to me .!
Advertisements
How many types of drawing objects are available in drawing toolbar
Please write code for this program in java and Explain it ? pl'sssssssss
code for creating Complex objects in Spring - Spring
Please explain what is hibernatetemplate with an example code.
explain the difference between string builder and string buffer classes
code for recently created file from a folder in java - Java Beginners
how many types of system classes are there?
Explain about threads:how to start program in threads?
How to write create JPA Many-to-Many Relationship in Java?
How to Explain different way of using thread?
How to Explain different way of using thread?
how many ways to load the class in java
how to display the output of the newly created excel file
How a split a file into many based on size?
how to validate values in the dynamically created textboxes?
What are events? Explain how Event handling in Java?
what is jvm instance, how is it created, how is related to thread?
java code to compare two hash map objects
how the answer is 13 can anyone explain plz
how many hours and minutes in 8725 seconds
how many ways are there to invoke a servlet object?
Explain how you overcame a major obstacle
How many types of web hosting are available?
Code for Garbage Collection
One byte consists of how many bits?
how many max. arguments we pass to the any function ? how many max. arguments we pass to the any function ?
Video Tutorial - Classes and Objects in Java
How to read PDF files created from Java thru VB Script
<errors><error><domain>yt:quota</domain><code>too_many_recent_calls</code></error></errors>
How to Validate dynamically created text box in HTML using Javascript
Objects
How many hours do data scientists work?
How many hours should I practice programming?
How many hours does a data scientist work?
JSP implicit objects
How many qusetions can you ask?
how to code
How many days it will take to learn Docker
JPA Many-to-Many Relationship
Hibernate 4 Many to Many Mapping using Annotation
How to track how many hits my website gets?
How to delete objects using Hibernate?
How many ways we can give the output to a browser?
How many ways I can redirect a PHP page?
how many max. arguments we pass to the any function ?
How many ways can we get the value of current session id?
How many cookie object we can store in a session? is there any limit?
please explain this prog

Ads