This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

doubt in String

 
manas ranjan mandal
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to know that what is the different between new StringBuffer('A') and new StringBuffer("A")?

Thanks in advance
 
Garrett Rowe
Ranch Hand
Posts: 1296
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Campbell Ritchie
Sheriff
Pie
Posts: 49779
69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And please Use A Meaningful Subject Line. This thread has nothing to do with Strings.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic