Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

String is an immutable object.
Then how can the following code be justified.

String s1 = ?ABC?;
String s1 = s1+?XYZ?;
s.o.p(s1);

The output is ABCXYZ, which is the value of s1 ?

Answer Posted / ramesh

Compilation ERROR
Duplicate Variable s1.

Is This Answer Correct ?    2 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what are the methods in object?

1150


How will you calculate the depth of a binary tree if the tree contains 15 nodes?

1081


What is the set interface in java programming?

1211


What is method overriding in java ?

1190


What is assembly used for?

1020


What is the difference between a choice and a list?

1080


What is the difference between dom and sax parser in java?

974


What is method and methodology?

1100


Which arithmetic operations can result in the throwing of an arithmeticexception?

1027


What is singletonlist in java?

967


What is java abstraction with example?

1067


What is the core java?

948


What are the 4 versions of java?

1166


How would you format a date in java? I.e. In the ddmmyyy format?

1379


What are different types of arrays?

1014