Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.help > #1280

Enum basics

From Roedy Green <see_website@mindprod.com.invalid>
Newsgroups comp.lang.java.help
Subject Enum basics
Date 2011-11-04 15:11 -0700
Organization Canadian Mind Products
Message-ID <3bo8b7dd306f6pj50v2jk3t9704n1c0cjp@4ax.com> (permalink)

Show all headers | View raw


Are enums supposed to support static variables? static methods?

If the enum is nested in another class, are enum methods supposed to
be able to access the containing classes instance variables and
methods?

I believe the answer is "no" to all these questions, but I don't want
to lead people astray in my essay on enums.

You have to communicate with the enum via the initial constructor, or
by parms on enum methods.
-- 
Roedy Green Canadian Mind Products
http://mindprod.com
Capitalism has spurred the competition that makes CPUs faster and 
faster each year, but the focus on money makes software manufacturers 
do some peculiar things like deliberately leaving bugs and deficiencies
in the software so they can soak the customers for upgrades later.
Whether software is easy to use, or never loses data, when the company
has a near monopoly, is almost irrelevant to profits, and therefore 
ignored. The manufacturer focuses on cheap gimicks like dancing paper 
clips to dazzle naive first-time buyers. The needs of existing 
experienced users are almost irrelevant. I see software rental as the 
best remedy.

Back to comp.lang.java.help | Previous | NextNext in thread | Find similar


Thread

Enum basics Roedy Green <see_website@mindprod.com.invalid> - 2011-11-04 15:11 -0700
  Re: Enum basics "John B. Matthews" <nospam@nospam.invalid> - 2011-11-04 20:44 -0400
    Re: Enum basics Lew <lewbloch@gmail.com> - 2011-11-04 20:27 -0700
      Re: Enum basics "John B. Matthews" <nospam@nospam.invalid> - 2011-11-05 02:23 -0400
        Re: Enum basics Lew <lewbloch@gmail.com> - 2011-11-05 00:51 -0700
      Re: Enum basics Roedy Green <see_website@mindprod.com.invalid> - 2011-11-05 04:12 -0700
        Re: Enum basics Lew <lewbloch@gmail.com> - 2011-11-05 09:15 -0700
          Re: Enum basics Patricia Shanahan <pats@acm.org> - 2011-11-05 14:06 -0700
            Re: Enum basics Lew <lewbloch@gmail.com> - 2011-11-05 15:54 -0700
            Re: Enum basics Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-11-05 20:43 -0300
            Re: Enum basics markspace <-@.> - 2011-11-05 19:55 -0700
            Re: Enum basics Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-11-05 22:10 -0500
  Re: Enum basics Roedy Green <see_website@mindprod.com.invalid> - 2011-11-05 04:18 -0700

csiph-web