About Question enthuware.ocpjp.v7.2.1092 :

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

Moderator: admin

Post Reply
creolo
Posts: 1
Joined: Wed May 10, 2017 3:11 pm
Contact:

About Question enthuware.ocpjp.v7.2.1092 :

Post by creolo »

When I try to run this code, I get "Error - At least one public class is required in main file".
Is the something to note for the exam?

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

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

Post by admin »

Please compile and run it from the command line using Oracle's Javac/Java.

HTH,
Paul.

lenalena
Posts: 56
Joined: Tue Feb 21, 2017 4:24 pm
Contact:

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

Post by lenalena »

The answer choice says it will throw an Exception, but in fact it throws an Error. Although the result is the same (the program compiles but fails to run), the slight difference in the wording had me going in circles for a while.

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

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

Post by admin »

It doesn't say Exception. It says "exception" with a lower case e. Lower case exception is a commonly used term to refer to all kinds of exceptions. The real exam uses the same terminology.
Paul.

Post Reply

Who is online

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