wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes doubt in String Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "doubt in String" Watch "doubt in String" New topic
Author

doubt in String

manas ranjan mandal
Ranch Hand

Joined: Apr 02, 2008
Posts: 97
I want to know that what is the different between new StringBuffer('A') and new StringBuffer("A")?

Thanks in advance
Garrett Rowe
Ranch Hand

Joined: Jan 17, 2006
Posts: 1296
What is the output of this test and why:

Is there a StringBuffer constructor that takes a char as a parameter? If not, then which constructor is being invoked at line 2?
[ July 11, 2008: Message edited by: Garrett Rowe ]

Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38016
    
  22
And please Use A Meaningful Subject Line. This thread has nothing to do with Strings.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: doubt in String
 
Similar Threads
Adding nulls to stringbuffers
byte [ ] to StringBuffer
How many Objects are created ?
a simple question
StringBuffer...