This week's giveaway is in the Spring forum.
We're giving away four 3 month subscriptions to Marco Behler Videos and have Marco Behler on-line!
See this thread for details.
Win a 3 month subscription to Marco Behler Videos this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

What StringBuilder methods are you required to know for OCAJP 8?  RSS feed

 
Shane Jensen
Ranch Hand
Posts: 113
7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

I did the practice test on this page: http://www.java2blog.com/2016/10/ocajp-8-stringbuilder-mock-questions.html

Some of the StringBuilder methods used in the questions are ensureCapacity() and setLength().

I have been using Mala Gupta's preparation book, and these two methods are not mentioned at all in her book. Am I supposed to know these for the exam? Does anyone know what the complete list of String and StringBuilder methods are you need to know for the exam?

Thank you in advance!
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37051
507
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't need to know either of those methods for the exam. This is why study guides are useful - they give you a subset of methods to learn.

A tech edited Mala's OCA 7 book and the list of APIs was reasonable. I can't imagine she changed that for the COA 8 edition so go with what is in the book.
 
Shane Jensen
Ranch Hand
Posts: 113
7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jeanne,

Alright, I thought so. Good to know, thanks!
 
Paul Anilprem
Enthuware Software Support
Ranch Hand
Posts: 4060
33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Respectfully disagree. You need to know about these two methods. We have seen candidates getting questions on these.
 
Shane Jensen
Ranch Hand
Posts: 113
7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Anilprem wrote:Respectfully disagree. You need to know about these two methods. We have seen candidates getting questions on these.

Hi Paul,

Do you know what other String/StringBuilder methods might be tested?
 
Paul Anilprem
Enthuware Software Support
Ranch Hand
Posts: 4060
33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
StringBuilder

Constructors - all

Methods:
append - all flavors
charAt
delete
indexOf - all flavors
insert - all flavors
lastIndexOf
replace (Compare with String's replace)
reverse
substring
capacity
length
setLength


List of methods in String that can be ignored for the exam -
codePointXXX
all regex related methods such matches

Know that both are final classes. Implications.

HTH,
Paul.
 
Scott Selikoff
author
Bartender
Posts: 4087
21
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I haven't seen or heard about ensureCapacity() or setLength() either on the exam.  It's not on Jeanne and my study guide, Mala's book, or even K&B's new book. 

Perhaps these are experimental or new questions?  Seems like an odd thing to cover to be honest.
 
Paul Anilprem
Enthuware Software Support
Ranch Hand
Posts: 4060
33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
StringBuilder's toString as well. Know that StringBuilder overrides Object's toString.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37051
507
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Agreed that toString is important. That's covered in all the study guides.
 
Roel De Nijs
Sheriff
Posts: 11300
177
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For completeness: both methods are covered in the OCAJP8 study guide by Khalid A Mughal and Rolf W Rasmussen. I was the technical reviewer for that study guide, that's why I remembered (and I just verified it to be 100% sure, my memory is getting older and more volatile ).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!