20 lines
681 B
Java
20 lines
681 B
Java
// typeinfo/packageaccess/HiddenC.java
|
|
// ©2016 MindView LLC: see Copyright.txt
|
|
// We make no guarantees that this code is fit for any purpose.
|
|
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.
|
|
package typeinfo.packageaccess;
|
|
import typeinfo.interfacea.*;
|
|
|
|
class C implements A {
|
|
@Override
|
|
public void f() { System.out.println("public C.f()"); }
|
|
public void g() { System.out.println("public C.g()"); }
|
|
void u() { System.out.println("package C.u()"); }
|
|
protected void v() { System.out.println("protected C.v()"); }
|
|
private void w() { System.out.println("private C.w()"); }
|
|
}
|
|
|
|
public class HiddenC {
|
|
public static A makeA() { return new C(); }
|
|
}
|