It Behaves just like a class only we can declare constant objects in it
- enum EventType{
- Arrive (1),
- SERVE(2),
- Wait(3), //this is calling the constuctor
- Leave(4),
- DONE(5)
- private int type;
- EventType(int type){
- this.type = type;
- }
- }
<Prev Streams and Function Interfaces
No comments:
Post a Comment