GoodNewlinepublic class GoodNewline extends Object Multiple lines output from one method. |
Fields Summary |
---|
String | myName |
Constructors Summary |
---|
public GoodNewline(String s)
myName = s;
|
Methods Summary |
---|
public static void | main(java.lang.String[] argv)
GoodNewline jack = new GoodNewline("Jack Adolphus Schmidt, III");
jack.print(System.out);
| protected void | print(java.io.PrintStream out)
out.println(toString()); // classname and hashcode
out.println(myName); // print name on next line
|
|