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!
About Question enthuware.ocajp.i.v8.2.1444 :
Moderator: admin
-
- Site Admin
- Posts: 10388
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocajp.i.v8.2.1444 :
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
https://docs.oracle.com/javase/8/docs/a ... A-int-int-
and of course, run a test program to do a practical

Who is online
Users browsing this forum: No registered users and 7 guests