()
| 26 | Person(String last) { this(null, last, null); } |
| 27 | Person() { this(null, null, null); } |
| 28 | @Override public String toString() { |
| 29 | if(empty) |
| 30 | return "<Empty>"; |
| 31 | return (first.orElse("") + |
| 32 | " " + last.orElse("") + |
| 33 | " " + address.orElse("")).trim(); |
| 34 | } |
| 35 | public static void main(String[] args) { |
| 36 | System.out.println(new Person()); |
| 37 | System.out.println(new Person("Smith")); |