hi ranchers.
someone can i help me ?
I do not understand why the next code compiles ?
if you delete the static modifier of the line1 does not compile, what is the rule ?
package packed;
public class pack
{
static public int x1 = 7;
static protected int x2 = 8; // line1
static int x3=9;
static private int x4 =10;
}
package finalscjptiger;
import packed.pack;
class
test extends pack
{
public static void main(
String args[] )
{
pack p = new pack();
System.out.println( pack.x2 );
}
}
Thank in advance