Could somebody please clarify why any modifier other than public in the following pgm results in compile error... Are those modifiers (private, protected, friendly(no-modifer)) applicable only to methods and variables not classes? //Fred.java public class Fred { private int x = 0; private Fred (int xval) { x = xval; } }
Those modifiers that you mentioned can only be applied to methods, members and inner-classes (excluding the friendly modifier, which can be applied to anything) -khalid [This message has been edited by Khalid Bou-Rabee (edited July 17, 2000).]
\\ //<BR>~\// irucidal~
Don't get me started about those stupid light bulbs.