FileDocCategorySizeDatePackage
Protected.javaAPI DocExample452Sat Nov 25 12:55:46 GMT 2000None

Protected

public class Protected extends Object
Check what "protected" really means: can we see into a proteced attribute of another class in the same package as us?

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] argv)

		System.out.println("Protected values demo");
		Protected p = new Protected();
		p.process();
	
voidprocess()

		Protected2 p2 = new Protected2();	// can we spy into this?
		System.out.println("Process: " + p2.dat);
		p2.foo();