About Question enthuware.ocpjp.ii.v11.2.3337 :

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

Moderator: admin

Post Reply
tomex443
Posts: 3
Joined: Thu Aug 01, 2019 4:25 am
Contact:

About Question enthuware.ocpjp.ii.v11.2.3337 :

Post by tomex443 »

In code:

Code: Select all

String[] stra = Files.readLines(Paths.get(INPUT_FILE)); 
for(String s: stra) System.out.println(str);
Omit the fact that there is no such method: Files.readLines
The line: System.out.println(str);
Should be -> System.out.println(s);
If it is not intentional.

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

Re: About Question enthuware.ocpjp.ii.v11.2.3337 :

Post by admin »

Yes, it should be s instead of str but it is an incorrect option anyway.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 4 guests