About Question enthuware.ocpjp.v7.2.1625 :

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

Moderator: admin

Post Reply
ewebxml
Posts: 77
Joined: Sun Jun 30, 2013 10:04 pm
Contact:

About Question enthuware.ocpjp.v7.2.1625 :

Post by ewebxml »

Question:
Will the default delimiters "\t\n\r\f" be tokenized
for any arbitrary String?

The reason I ask is, the given String only contains 3 tokens:

String str = "tokens\twith tabs and \r\nnew lines.";

"\t\r\n\"


Please confirm.

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

Re: About Question enthuware.ocpjp.v7.2.1625 :

Post by admin »

I am sorry but I did not understand your question. Could you please provide more info?

ewebxml
Posts: 77
Joined: Sun Jun 30, 2013 10:04 pm
Contact:

Re: About Question enthuware.ocpjp.v7.2.1625 :

Post by ewebxml »

The way that I understand explanation c) is :
c. Default delimiters " \t\n\r\f" will be used to tokenize the string. (that is, they will not be tokenized )

Because delimiters themselves will not be returned as tokens, the number of tokens will be 6.

1. tokens
2. with
3. tabs
4. and
5. new
6. lines.

Please confirm.

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

Re: About Question enthuware.ocpjp.v7.2.1625 :

Post by admin »

That is correct.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest