Page 1 of 1

About Question enthuware.ocpjp.v7.2.1626 :

Posted: Fri Sep 20, 2013 9:46 am
by The_Nick
Hi,
So it would be neither like regex nor like glob syntax. Their corresponding pattern would be [DELIM]. Is it correct?
Furthermore I see that there are 2 methods very similar nextToken and nextElement, the former return a String and the latter returns an Object.
What's the purpose of having nextElement? StringTokenizer always acts on Strings..

Thanks in advance.

The_Nick.

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

Posted: Fri Sep 20, 2013 5:36 pm
by admin
Why do you think it is not like regex?

nextElement is there because of the legacy Enumeration interface that StringTokenizer implements.

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

Posted: Sat Sep 21, 2013 10:12 am
by The_Nick
admin wrote:Why do you think it is not like regex?

nextElement is there because of the legacy Enumeration interface that StringTokenizer implements.
Because in regex you would get the same pattern only between square brackets [DELIM] instead here is passed in the constructor without square brackets.

Thanks.
The_Nick.

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

Posted: Thu Jul 14, 2016 8:15 am
by pfilaretov
Hi, Paul!
The first option "Do, Not, Do, This" can't be considered as correct because of NOT having comma at the end. So this simplifies the resolution. IMHO, it would be better to correct this option to "Do, Not, Do, This," (with comma at the end).
As you wish, though :)

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

Posted: Thu Jul 14, 2016 8:52 am
by admin
Added.
thank you for your feedback!
Paul.