Enumerations are neat. They are simply integers with named values, so if you were put
enum LIST_NAME = {OPTION1, OPTION2, OPTION3, OPTION4 = 100);
You can use LIST_NAME = 0, or LIST_NAME = OPTION1 interchangeably. It is similar as creating a (have to use a final variable in java) #define called OPTION1 and setting it to 0. However, I don't believe OPTION1 will have meaning for integers other than LIST_NAME (I don't usually use these things)
Note: The numbering starts at one, and increments one for each item in the list. You can set your own starting number, or your own individual numbers.
Now, I wholeheartedly suggest you go to javabook.org, which is a FREE, full-length textbook, among other things. You, however, should check out the EasyEvents tutorial, which is a bottom up tutorial on making yourself a really easy applet structure (if I remember correctly). The author is a real cool guy (retired now), I had him for CS 2, and its THE class I learned the most in for CS.
His book is great, a great read and very informative. It's more of a tutorial than a full-blown reference, but at the beginning you can know nothing about Java or programming, and if you finish the whole book, you'll be a pro at both (he gets into really advanced topics, which a lot of primers don't). It IS a school book, though, so its less technical and more theoretical, but he does cover Java very thoroughly
enum LIST_NAME = {OPTION1, OPTION2, OPTION3, OPTION4 = 100);
You can use LIST_NAME = 0, or LIST_NAME = OPTION1 interchangeably. It is similar as creating a (have to use a final variable in java) #define called OPTION1 and setting it to 0. However, I don't believe OPTION1 will have meaning for integers other than LIST_NAME (I don't usually use these things)
Note: The numbering starts at one, and increments one for each item in the list. You can set your own starting number, or your own individual numbers.
Now, I wholeheartedly suggest you go to javabook.org, which is a FREE, full-length textbook, among other things. You, however, should check out the EasyEvents tutorial, which is a bottom up tutorial on making yourself a really easy applet structure (if I remember correctly). The author is a real cool guy (retired now), I had him for CS 2, and its THE class I learned the most in for CS.
His book is great, a great read and very informative. It's more of a tutorial than a full-blown reference, but at the beginning you can know nothing about Java or programming, and if you finish the whole book, you'll be a pro at both (he gets into really advanced topics, which a lot of primers don't). It IS a school book, though, so its less technical and more theoretical, but he does cover Java very thoroughly
-Larrik Jaerico
www.LarrikJ.com
www.LarrikJ.com