About Question com.enthuware.ets.scjp.v6.2.125 :

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

Moderator: admin

Post Reply
Amol Khopkar
Posts: 5
Joined: Sat Mar 23, 2013 4:05 am
Contact:

About Question com.enthuware.ets.scjp.v6.2.125 :

Post by Amol Khopkar »

"name:john;;sex:m;;".split(";");
it's like
name:john;"";sex:m;"";
so it should contain 4 elements

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

Re: About Question com.enthuware.ets.scjp.v6.2.125 :

Post by admin »

Did you read the description of the split method given with the question? It clearly says, "trailing empty strings will be discarded".

HTH,
Paul.

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests