Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

String and String Buffer  RSS feed

 
vidhya subramaniam
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In one of the mock exams it says the String class has an object which takes String Buffer object as an argument. Is this statement true or false. The answer given is true. Can please someone explain.
Thanx
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One of the constructors for String takes a StringBuffer as an argument.
http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html
When in doubt, check the API.
------------------
Tom - SCJP --- Co-Moderator of the Programmer Certification Forums
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!