Share on Google+Share on Google+

vramanjikota
enum
1 Answer(s)      4 years and 10 months ago
Posted in : Java Beginners

why we are not created child for enum type? why we are not extending any from enum?

Ads

View Answers

May 30, 2012 at 6:15 PM


An enum can be declared outside or inside a class, but can not be declared in a method. Only public or default modifier can be used by the declaration of a top-level enum. You can use public, default, protected or private modifier on the declaration of a nest enum. All of enum type are subclasses of java.Lang.Enum, since Java does not support multiple inheritance, an enum cannot extend anything else.










Related Tutorials/Questions & Answers:
enum
enum  HOW TO INSERT enum constants at runtime into the enum
enum
enum  why we are not created child for enum type? why we are not extending any from enum
Advertisements
enum
enum  enum concept is developed based on class concept,but we can extend any class from our class,but why it is not passiable to extend by enum? every class in java directly and indirectly child class of Object class,every enum
enum php mysql
enum php mysql  How to use mysql enum in php
need ENUM examples
need ENUM examples  i need enum sample examples
need ENUM examples
need ENUM examples  i need enum sample examples   Hi Friend, Visit Here Thanks
need ENUM examples
need ENUM examples  i need enum sample examples   Hi Friend, Visit Here Thanks
about enum - Java Beginners
about enum  hi all, please tell me about "enum" and explain with example. And its use in OOP. Thanks
Enum Type
Enum Type       Enum... of that enum. The super class of all enum objects is java.lang.Enum, apart from this enum can not be extended. There is another important feature that is every enum
need ENUM examples
need ENUM examples  i need enum sample examples   Hi Friend, Try the following code: public class EnumExample { public enum Languages{ C, Java, DOTNET, PERL } public static void main(String[] args){ int
Enum data type
Enum data type  How can we use enum data type in java program?   Example enum Fruits { APPLE(10), ORANGE(3), MANGO(5), LICHHI(10...() + ")"); } } Result Display APPLE(10) Description:- In this example we are using enum
ENUM Types
ENUM Types A Enum type consist of a fixed set of constants. In java, you define an enum type by using the enum keyword. For example, you would specify a months-of-year enum type as: public enum Year{ January,February,March
How to get enum value in Java
How to get enum value in Java  Hi all, i am looking for a solution to get an enum value from index in Java. Please suggest. Thanks
difference between enum and final class?
difference between enum and final class?  what is the difference between enum and final class in java?   The java.lang.Enum is an abstract.... The definition of Enum is: public abstract class Enum> extends Object implements
Inserting a value to an Enum field in Table
Inserting a value to an Enum field in Table  I'm writing a code..., password varchar (10), is_Admin enum('Y','N'), In the Java code I have a user... this enum field in the table
Enum Data Types
Enum Data Types       Enum type is a type which consist of fixed set of constant fields. like direction... take an example of enum data types:   EnumTestResult.java
Java error class interface or enum excepted
Java error class interface or enum excepted... or enum excepted are the class of java error that occurred when a programmer... java error class or enum excepted ,For this we have a class
SCJP Module-1 Question-25
Given a sample code: 1    class Test { 2    public enum Man { 3    RAJ, SURAJ, DINESH, GUYS     }; 4    public static void main(String[] args) { 5 
SCJP Module-1 Question-13
Given a sample code: enum Year { JANUARY, FEBUARY, MARCH, APRIL, MAY, JUNE, JULY } class EnumTest { Year year; public EnumTest(Year year) { this.year = year; } public void tellItLikeItIs() { switch (year) { case JANUARY
Java - Java Beginners
Java enum class tostring  An example of Java enum class tostring
java - Java Beginners
Java enum valueof string  How to get a value of enum into string in Java
JAVA
JAVA  I got another error like class,interface or enum Excepted
Enumeration in java
of predefined constants. The enum variable must equal to one of the values... they are constants and the values of enum are in upper case. In Java you can define an enum by enum keyword. public enum direction {NORTH, SOUTH, WEST, EAST
contains for list in struts2 - Struts
contains for list in struts2  Is there any way to check in the list or for existence of an enum ? Something like list.contains(string). iterating over list I want to do something like Display x display y
enumerations in java - Java Beginners
. It provides Compile-time type safety.For each enum type,a namespace has been... name.Typesafe constants(Enum) aren't compiled into clients, so you can add, reorder... arbitrary fields and methods to an enum class.An enum type implements the arbitrary
java - Java Beginners
java  where do i declare an enum?  Hi Friend, Please visit the following link: http://www.roseindia.net/java/master-java/enum.shtml Thanks
Java - Java Beginners
Java  Please help me with the following program! Thanks! 2. construct 2 enum classes, the first for the 7 colors; and the second for menu options: add, delete, update and quit. Then write an interactive program that creates
Classes and Objects
of classes within other classes, enum and annotations. Classes.... Enum Types:  Enum is a keyword which was introduced... objects which are members of that enum. The super class of all enum objects
Classes and Objects
to cover nesting of classes within other classes, enum and annotations. Classes...; Enum Types:  Enum is a keyword which was introduced... objects which are members of that enum. The super class of all enum objects
UILineBreakModeWordWrap is deprecated
is the list of new enums defined in latest version of Xcode: enum
collection frame - Java Interview Questions
). (4)Enumerations: The enum keyword creates a typesafe, ordered list of values... enum pattern). (5)Swing: New skinnable look and feel, called synth. Varargs
Tutorials   
Java Spring Hibernate Struts Training What does core Java include? java What are some way to learn Java quickly? Is it required to learn Java before learning Java Script? Is it necessary to learn java script before learning PHP? Are HTML5 and Java Script boosts Java career? Is Java object oriented? Fingerprint application with Java Uninstall Oracle Virtual Box JSON to HashMap Free Java online Training I want example of Control Statement in Java ANSI Color Codes with Python Create a Program that Calculates Input What is difference between JDK,JRE and JVM? How to see ubuntu version on server? How to get Page Source in Selenium (WebDriver) using Java? The path to the driver executable must be set by the webdriver.gecko.driver system property parse data from a link in java Java Program Qns using BlueJ How to fix HAX Kernel Module Is Not Installed error? Installing Audacity Looking for code Logic to check track changes & Coments in MSWord, MSWordx, MSExcel, MSExcelx is ON/OFF Installing JDK on Mac SAX Parser exception ERROR 601 (42P00): Syntax error. Encountered Thread java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileItemFactory How to install Ubuntu 16.04 LTS? HttpServletRequest cannot be resolved to a type in eclipse - Solved Unhandled event loop exception GC overhead limit exceeded Spring Data jpa with apache phoenix Caused by: java.lang.IllegalArgumentException: Not a host:port pair: PBUF o.a.h.h.z.RecoverableZooKeeper - Possibly transient ZooKeeper, quorum= com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager class not found com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager not found How to download and install Java 8 on Windows? How to uninstall JDK 7? How to install gtk-doc-tools package in Ubuntu? How to install Oracle JDK 8 on Ubuntu? ejabberd_ctl.beam not found - Solved How to convert date to UTC format in Java? How to install autoconf, automake and libtool in Ubuntu 15.10? How to convert current date to mm dd yyyy format in Java? How to convert current date to dd mm yyyy format in Java? How to stop window closing in "internalFrameClosing" event. How to find list of all index in Neo4j? neo4j-server.properties file location SASLError using PLAIN: not-authorized how to convert war file into .exe file using java code

Ads

 
Advertisement null

Ads