About Question enthuware.ocpjp.v8.2.1277 :

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

Moderator: admin

Post Reply
karlose2006
Posts: 2
Joined: Wed Sep 18, 2019 11:14 pm
Contact:

About Question enthuware.ocpjp.v8.2.1277 :

Post by karlose2006 »

Class A should be public for compile

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

Re: About Question enthuware.ocpjp.v8.2.1277 :

Post by admin »

Not really. It is ok to have a non-public class in a file. You might want to try compiling it to confirm.

The rule is that a public class must be in a file by the same name. So, if class A were public, then it had to be in A.java file.
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 59 guests