This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

enum clarification

 
Garlapati Ravi
Ranch Hand
Posts: 171
  • 0
  • 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
Pie
Posts: 15150
31
Android IntelliJ IDE Java Scala Spring
  • 0
  • 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
  • 0
  • 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