About Question enthuware.ocpjp.v8.2.1277 :
Moderator: admin
-
- Posts: 2
- Joined: Wed Sep 18, 2019 11:14 pm
- Contact:
About Question enthuware.ocpjp.v8.2.1277 :
Class A should be public for compile
-
- Site Admin
- Posts: 10046
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v8.2.1277 :
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.
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.
Who is online
Users browsing this forum: No registered users and 59 guests