This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JXAM

 
Stephen Joseph
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which of the following are methods within the String class.
1.subString();
2.startsWith();
3.toString();
4.toUppercase();
5.toindexOf();
They have given all correct,which cannot be,because they have no arguments except in case of 3 and 4.
Thanks!
Steven

 
Pat Barrett
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
The SunJavadocs list methods 1 through 4 as being in the String class (although #1 should actually be substring() ). I'm not sure if # 5 is correct or not, although if Sun doesn't list it I'd think it would be wrong.
Pat B.

[This message has been edited by Pat Barrett (edited February 07, 2001).]
 
Val Dra
Ranch Hand
Posts: 439
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
number 4 is wrong since it should be toUpperCase()1 and 5 are also wrong.
 
Sai Ram9
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1,4 are wrong no idea about 5
1 should be substring()
4 should be toUpperCase()
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic