Java M5
Java M5
Multithreaded Programming
Java provides built-in support for multithreaded programming.
A multithreaded program contains two or more parts that can run concurrently.
Each part of such a program is called a thread, and each thread defines a separate path
of execution. Thus, multithreading is a specialized form of multitasking.
Multithreading enables you to write efficient programs that make maximum use of the
processing power available in the system.
Thread Priorities
Thread priorities are used by the thread scheduler to decide when
each thread should be allowed to run.
Type Wrappers
The type wrappers are Double, Float, Long, Integer, Short, Byte,
Character, and Boolean.
Enumerations
An enumeration is a list of named constants that define a new data type and its legal
values.
Thus, an enumeration object can hold only a value that was declared in the list. Other
values are not allowed.
For example, here is a simple enumeration that lists various apple varieties:
The identifiers Jonathan, GoldenDel, and so on, are called enumeration constants.
Each is implicitly declared as a public, static final member of Apple.
Apple ap;
enumeration.