public class ch5ex1 {
  public int i;
  private int j;
  protected int k;
  public void f() {}
  private void g() {}
  protected void h() {}
  public static void main(String args[]) {
    ch5ex1 x = new ch5ex1();
    x.i++;
    x.j++;
    x.k++;
    x.f();
    x.g();
    x.h();
    // Hey, everything works!
  }
}

class test {
  public static void main(String args[]) {
    ch5ex1 x = new ch5ex1();
    x.i++;
    //! x.j++;  // cannot access
    x.k++;      // Manipulates protected data (exercise 2)
    x.f();
    //! x.g(); // cannot access
    x.h();     // Calls protected method
  }
}
