java definitions

Download Java Definitions

If you can't read please download the document

Upload: sankar-susarla

Post on 08-Nov-2015

214 views

Category:

Documents


0 download

DESCRIPTION

java

TRANSCRIPT

Ennumeration - sometimes you'll want to create a set of constant values to represent the onlyvalid values for a variable. This set of valid values is commonly referred to as an enumeration.

When you create an enum, you're creating a new class, and you're implicitly extending java . lang. Enum.

You can declare an enum as its own standalone class, in its own source file, or as a member of another class.

In its simplest form, an enumeration is a list of named constants that define a new data type. An object of an enumeration type can hold only the values that are defined by the list. Thus, anenumeration gives you a way to precisely define a new type of data that has a fixed number of valid values.

Generics -