• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

enum clarification

 
Garlapati Ravi
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can anyone tell me why "inside enum" is printed thrice ?
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15354
39
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are three enum constants (BIG, HUGE, OVERWHELMING). For each of those, an instance of the enum is made and the constructor is called.

Note: When you copy a question from a book, mock exam or other source, you are required to quote your sources. Please tell us where you copied this from.
 
Garlapati Ravi
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oh, yeah lately realised. that was a silly question. Thanks!

I have copied that from my EditPlus editor

These terms(BIG, HUGE, OVERWHELMING and CoffeeSize) i have copied from Kathy and Bert SCJP book.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic