How to use java.lang.Enum -


This enum is not a question of new features. This is not a question that waits for an answer that says Enum Xyz is equal to class extends into Enum if you have found in many tutorials how to use propaganda on how enums are used , Please do not reply.

This question is especially on how to use the cloud java.lang.Enum. Rather it is true that java.lang.Enum can not be directly extended nor is it right, right? It is true that java.lang.Enum is only for the benefit of enum type and nothing else?

If so, the variable color is quite meaningless, is not it? Although the compiler allows it.

Last Fixed Enum & lt; Color & gt; Color = null; Enam color {"R", "G", "B"};

So, how can I possibly make variables similar to zero?

Of course, the compiler will not allow me to do this

  square bascoll enum & lt; BaseColour & gt; Expands {,,,}  

but allows an improper advantage to be able to manipulate a compiler as a back-fall manipulation.

I am asking this question because I want to do something like this class red basalist {"crimson", "blood", "pink"}; Class Pearl Biscuit ("Violet", "Evening Sky", "Badgeal"); The class spreads to the Greenish bascalor ("algae", "leaf"};

I want to pass any of these, and only any of these, one type of calculation method

  Zero Squeeze color (Beskor color congestion) {...}  

Is this possible? / ** If not, and if you are James Gosling et al are going to be, would you please consider it for the next version of Java spectacles? ** /

In addition to the question: I forgot to say ... what I am working on is using anomamap or anmasset and it involves and uses range methods. Was it the best I could do?

Internally, an enum is actually an integer constant. Or at least, JVM will treat it as one. Is free to do, due to the same restrictions which are frustrating you This makes the object-oriented become efficient at the cost of breaking.

I suggest that you take back the old "Type Check Encryption" pattern that was used before the anonymity.

  square fu constants public static final fu RHUBARB = new fu (); Public stable final fu custard = new fu (); // Only static protected Foo () {}}  
this square and sub-sections

Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -