• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

String / StringBuilder Methods for OCA exam

 
Ranch Hand
Posts: 77
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good point,

I also wonder whether we should know all the possible alternatives or not.
 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic