GoConqr has a new look! Let us know what you think.

Flashcards

Enums

Nathan Hunsdale Programming 2 Masters of Science English 11 cards

Cards in this deck (11)

  1. 1Enums An Enum is a type whose fields consist of a _____ _____ _____ _____An Enum is a type whose fields consist of a fixed set of contraints
  2. 2Enums Because they are constants, the names of an enum's field are in _____ lettersuppercase
  3. 3Enums You define an enum type by using the keyword _____ for example...enum
    public enum day{
    SUNDAY, MONDAY, TUESDAY WEDNESDAY, THURSDAY, FRIDAY, SATURDAY}
  4. 4Enums When should you use an enum?Anytime you need to represent a constant
  5. 5Enums What is a constant? e.g...Something that will never, or very rarely, change
    e.g. Days, Compass Points
  6. 6Enums What are natural enums? e.g...Enums that are to do with nature, and will not change
    e.g. Planets
  7. 7Enums You should use an enum when there are data sets where you know all the possible values at _____ _____Compile Time
  8. 8Enums Which programming language has much more powerful enums than other languages?Java
  9. 9Enums The enum declaration defines a _____ called an _____ _____The enum declaration defines a class called an enum type
  10. 10Enums The enum class body can include _____ and other _____The enum class body can include methods and other fields
  11. 11Enums The compiler automatically adds some special methods when it creates an enum such as the static _____ method that returns an _____ containing all of the values of the enum in the order they are declaredThe compiler automatically adds some special methods when it creates an enum such as the static VALUES method that returns an ARRAY containing all of the values of the enum in the order they are declared

Information

Description
Masters of Science Programming 2 Flashcards on Enums, created by Nathan Hunsdale on 31/05/2014.
Created by
Nathan Hunsdale · May 2014
Updated
Feb 19, 2016
Views
20
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?