Hi,
I was going through following question from site
http://www.jchq.net/certkey/0102certkey.htm
Question 8)
What will happen when you attempt to compile and run this code?
private class Base{}
public class Vis{
transient int iVal;
public static void main(
String elephant[]){
}
}
I have not understood the answer which says
Answer 8)1) Compile time error: Base cannot be private
A top level class such as base cannot be declared to be private.
we are not extending Base class right. Why still it complain.
please advise.
Tags: