• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

String / StringBuilder Methods for OCA exam

 
N Sam
Ranch Hand
Posts: 77
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

There are numerous methods for class String(). I was going through them at http://docs.oracle.com/javase/7/docs/api. Mala Gupta's book mentions only 8 methods out of these(charAt, indexOf, substring, trim, replace, length, startsWith, endsWith). I am wondering if these are sufficient for the exam. What other methods have shown up in the exam ? Would like to see comments from those who have finished this exam. Thanks.
 
Tonguc Koc
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good point,

I also wonder whether we should know all the possible alternatives or not.
 
K. Tsang
Bartender
Posts: 3585
16
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmm interesting.

Besides the mentioned: charAt, indexOf, substring, trim, replace, length, startsWith, endsWith

I suggest you also know: concat, equalsIgnoreCase, toLowerCase, toUpperCase, lastIndexOf, split, replaceAll, toString

 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The exam topics on the official page are quite vague about String and StringBuilder methods:
* Manipulate data using the StringBuilder class and its methods
* Creating and manipulating Strings


So based on these topics every method from both classes could be on the exam Also Oracle can add new exam questions covering other methods without having to change the official exam topics. The 8 methods covered by Mala Gupta's book might be enough for the OCAJP7. If you also take the methods mentioned by K. Tsang into account, you will be able to answer every String question on the OCAJP7 exam.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic