• Post Reply Bookmark Topic Watch Topic
  • New Topic

Marcus Green #2 Question 8

 
Leonardo Silva
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
thnks
 
Paul Stevens
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Top level class cannot be private.
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!