Page 1 of 1

About Question enthuware.ocpjp.v7.2.1092 :

Posted: Wed May 10, 2017 3:14 pm
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?

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

Posted: Wed May 10, 2017 10:08 pm
by admin
Please compile and run it from the command line using Oracle's Javac/Java.

HTH,
Paul.

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

Posted: Sat May 13, 2017 5:12 pm
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.

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

Posted: Sat May 13, 2017 8:27 pm
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.