Guest User

Untitled

a guest
Oct 17th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.30 KB | None | 0 0
  1. public class TT {
  2.  
  3.     private static int OBJECT_COUNT = 0;
  4.  
  5.     public int id;
  6.     public final String name;
  7.  
  8.     {
  9.         OBJECT_COUNT++;
  10.         id = OBJECT_COUNT;
  11.     }
  12.  
  13.     public TT(String name) {
  14.         this.name = name;
  15.     }
  16.  
  17.     public TT() {
  18.         this("unnamed_TT");
  19.     }
  20. }
Add Comment
Please, Sign In to add comment