Finished example.

This commit is contained in:
Ilkka Seppälä
2015-05-24 21:47:57 +03:00
parent 9122c7f0e6
commit bff34cfd21
3 changed files with 56 additions and 3 deletions

View File

@@ -1,5 +1,21 @@
package com.iluwatar;
public class Oliphaunt {
private static int counter = 1;
private final int id;
public Oliphaunt() {
id = counter++;
}
public int getId() {
return id;
}
@Override
public String toString() {
return String.format("Oliphaunt id=%d", id);
}
}