|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object Person
public class Person
Class the represents a person
Constructor Summary | |
---|---|
Person()
Constructor that takes no arguments |
|
Person(String name)
Constructor that takes a name |
Method Summary | |
---|---|
String |
getName()
Method to get the name |
void |
greet()
Method to greet another person |
static void |
main(String[] args)
Main method for testing |
void |
setName(String someName)
Method that sets the name |
String |
toString()
Method to get an information string |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Person()
public Person(String name)
name
- the name to useMethod Detail |
---|
public void setName(String someName)
someName
- the name to usepublic String getName()
public String toString()
toString
in class Object
public void greet()
public static void main(String[] args)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |