FileDocCategorySizeDatePackage
Protected2.javaAPI DocExample552Sun Dec 27 15:20:34 GMT 1998None

Protected2

public class Protected2 extends Object
This class is in the same package as Protected above. If this compiles, it means that "protected" DOES allow access to other classes in the same package (and it does, on JDK1.1.x). Note that JDK1.0 had "private protected" for this purpose, but JDK1.1 does not.

Fields Summary
protected int
dat
A protected datum: can we see it from Protected1?
Constructors Summary
Methods Summary
protected voidfoo()
A protected method: can we call it from Protected1?

	
	          
	   
		System.out.println("In a Protected2 object's foo() method.");