File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes String declaration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "String declaration" Watch "String declaration" New topic
Author

String declaration

sriramaraju vysyaraju
Greenhorn

Joined: Sep 09, 2008
Posts: 8
String str="sri"+"rama"+"raju";
How many String objects are created in the above statement?
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

What's your guessed ? What you think ? If you don't have knowledge about String constant pool , Googled It !


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36453
    
  15
Originally posted by sriramaraju vysyaraju:
String str="sri"+"rama"+"raju";
How many String objects are created in the above statement?
97. And you might find something about the constant pools on the BCEL website; look at �2 and �3.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: String declaration
 
Similar Threads
Tech Word Game
date format with MS Access database
How to convert byte array into string array?
WA #1.....word association
ResultSet to Array