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

State the significance of public, private, protected class?

1164


What if the main() method is declared as private? What happens when the static modifier is removed from the signature of the main() method?

1242


What is the main difference between java platform and other platforms?

1181


Write an algorithm program in java for the following question.. In a VLSI design techniques,they used rectangles to design circuits. EVery rectangle is to be placed according to x,y coordinates. Check whether or not two rectangles overlap each other. Here overlapping of rectangles is acceptable, if 1) one rectangle intersect with other. 2) one rectangle fully covers other. The time of algorithm should not exceed o(n logn).

2776


Is java a compiler?

1022


Can a class have 2 constructors?

962


Write a function to find out longest palindrome in a given string?

1121


What do you mean by singleton class in java?

959


What is the indent key?

1090


Can list contain null in java?

1146


What is the functionability stubs and skeletons?

1210


What is pojo class in java?

1203


Why constructor has no return type?

1134


What is 32 bit float?

1061


Why is the main method declared static?

1183