FileDocCategorySizeDatePackage
MethodAndField.javaAPI DocExample405Tue Jun 18 16:29:44 BST 2002None

MethodAndField

public class MethodAndField extends Object
Show a class that has a method and a field with the same name (and type).

Fields Summary
int
a
A field named a (whose value is computed by method a for good measure)
Constructors Summary
Methods Summary
inta()
A method named "a"

		return 42;
	
public static voidmain(java.lang.String[] args)
A main method to show that it all works.


	          
	     
		System.out.println(new MethodAndField().a);