wood burning stoves 2.0
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes enum clarification Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "enum clarification" Watch "enum clarification" New topic

enum clarification

Garlapati Ravi
Ranch Hand

Joined: Mar 05, 2008
Posts: 171
can anyone tell me why "inside enum" is printed thrice ?

Ravi Kumar
SCWCD 5 - 89%, SCJP 1.4 - 90%
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 15033

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.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Garlapati Ravi
Ranch Hand

Joined: Mar 05, 2008
Posts: 171
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.
I agree. Here's the link: http://aspose.com/file-tools
subject: enum clarification
It's not a secret anymore!