Page 1 of 1

About Question enthuware.ocpjp.v7.2.1625 :

Posted: Mon Feb 09, 2015 12:52 am
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.

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

Posted: Mon Feb 09, 2015 5:28 am
by admin
I am sorry but I did not understand your question. Could you please provide more info?

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

Posted: Mon Feb 09, 2015 11:05 am
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.

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

Posted: Tue Feb 10, 2015 12:43 am
by admin
That is correct.