File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Marcus Green #2 Question 8 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Marcus Green #2 Question 8" Watch "Marcus Green #2 Question 8" New topic

Marcus Green #2 Question 8

Leonardo Silva

Joined: Apr 03, 2001
Posts: 13
private class Base {}
public class Vis {
transient int iVal;
public static void main (String args []){
The compiler complains about the access modifier in the Base Class. They have no inheritance relation and they are in the same package (as if it compile the .class files would be created in the same directory).
Paul Stevens
Ranch Hand

Joined: May 17, 2001
Posts: 2823
Top level class cannot be private.
I agree. Here's the link:
subject: Marcus Green #2 Question 8
It's not a secret anymore!