About Question enthuware.ocajp.i.v8.2.1444 :

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
Deleted User 3513

About Question enthuware.ocajp.i.v8.2.1444 :

Post by Deleted User 3513 »

Hi,

I would like to clarify the choice:

return new StringBuilder("xxxx").insert(0, fullPhoneNumber, 0, 8).toString();

From my understanding, I have a StringBuilder("xxxx"). Then, I insert the contents of fullPhoneNumber(from index 0 to 7) at the index 0 of the StringBuilder("xxxx")?

Thanks in advance!

admin
Site Admin
Posts: 10388
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocajp.i.v8.2.1444 :

Post by admin »

Yes, that is correct. But always refer to the official JavaDoc for confirmation:
https://docs.oracle.com/javase/8/docs/a ... A-int-int-

and of course, run a test program to do a practical :)

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests