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

when to use ArrayList and when to use HashMap in webApplication.

4707


What is static keyword in java?

1001


Can a constructor call the constructor of parent class?

1041


how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? : Java thread

1002


What is one third plus one third as a fraction?

936


How do you create a first line indent?

1002


When a thread is executing a synchronized method , then is it possible for the same thread to access other synchronized methods of an object ?

1035


which pattern is default in scanner package?

2235


Java is pass by value or pass by reference? Explain

990


Write a java program that prints all the values given at command-line.

1011


can java object be locked down for exclusive use by a given thread? Or what happens when a thread cannot acquire a lock on an object? : Java thread

983


What will happen if static modifier is removed from the signature of the main method?

969


What is java oops?

1080


What are heterogeneous objects?

1048


What is arrays aslist in java?

955