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...

1).what is the difference between below examples

String s="vijay";

String s=new String("vijay");

Answer Posted / karun

In first statement String s = "vijay"

Means it will create a single instance and single reference
variable

but in second statement

String s = new String("vijay");

Means it will create a two instances and single reference
variable

Is This Answer Correct ?    4 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is predicate in java?

1008


Can an interface implement another interface?

976


How to create com object in Java?

1009


What is a java applet? What is an interface?

1029


What is queue in java?

1066


What does java final mean?

962


Explain about features of local inner class?

1084


What is the purpose of stub and skeleton?

955


What do you mean by stack?

1090


What is the function of http?

973


How dead lock situation occurs in java and how you can identify it?

941


What does it mean to be immutable?

919


Explain about anonymous inner classes in java?

999


Is hashset ordered?

980


What are the advantages of exception handling in java?

996