edu.pdx.cs399J.lang
Class Person

java.lang.Object
  extended by edu.pdx.cs399J.lang.Person

public class Person
extends Object

This class demonstrates constructors, the toString method, and instance fields.


Constructor Summary
Person(String name, double shoeSize)
          Creates a new person
 
Method Summary
static void main(String[] args)
          Program that creates and prints a Person
 double shoeSize()
          Returns this Person's shoe size.
 String toString()
          Returns a String represenation of this person
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Person

public Person(String name,
              double shoeSize)
Creates a new person

Method Detail

shoeSize

public double shoeSize()
Returns this Person's shoe size.


toString

public String toString()
Returns a String represenation of this person

Overrides:
toString in class Object

main

public static void main(String[] args)
Program that creates and prints a Person



Copyright © 2000-2009 Portland State University. All Rights Reserved.