// Project: PackageAccessibility // Test the four kinds of accessibility: // public, protected, private, package (default). import it313.A; public class Main { public static void main(String[] args) { A a = new A( ); // x is accessible because it is public; // public members are accessible anywhere. System.out.println(a.x); // z cannot be accessed because it is private. // System.out.println(a.z); // y and z cannot be accessed because A // is not in the same package as the current // System.out.println(a.y); // System.out.println(a.z); } }