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 / ravikiran

first one will create an object on the heap
second one will create two objects one will saved on the
heap and another will get saved on the string pool

Is This Answer Correct ?    0 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What restrictions are placed on method overriding?

1238


What is a boolean in java?

1107


Can we have this () and super () together?

1094


What are pass by reference and pass by value?

1036


What are the differences between checked exception and unchecked exception?

1012


Explain about abstract classes in java?

1088


Is java hashset ordered?

1174


Give an example of use of pointers in java class.

1071


What is the difference between abstract classes and interfaces?

1082


What is the difference between final, finally and finalize()?

1240


Are constructors methods?

1072


How is tree Mirroring implemented?

1120


What data type is true or false?

1088


Can a string be null?

1038


What are advantages of using Java?s layout managers than windowing systems?

2427