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

Define "Access specifiers" in java.

1217


What are the steps involved to write rmi based programs?

1067


Write a code to create a trigger to call a stored procedure

1029


What is class and object in java?

1061


what is the difference between process and thread? : Java thread

1022


What is JFC?

1326


What is nan inf?

1168


What about static nested classes in java?

1190


Is void a keyword in java?

1062


Explain the difference between an Interface and an Abstract class?

1226


How will you add panel to a frame?

1163


Is java a utf 8 string?

1021


How do you override a method in java?

1049


java program with complete 4 oops concepts implemented example

3211


What is the base class of all exception classes in java?

1105