Java for beginners - Chapter 18 : Enums in Java

preview_player
Показать описание
Enums in Java:

Enum is a data type in Java.
Enum contains a set of fixed constants.
Defining Enum :
Enum can be defined inside the class.
Enum can also be defined outside the class.
We can initialize values to the constants in enum.
We can use enum in switch statement.

Key points in java enum :
It improves type safety.
We can use enum in switch very easily.
It can have fields, constructors and methods.
It can be traversed.
It cam implement interface but it cannot extend class.

ankpro
ankpro training
C#
C sharp
Bangalore
Rajajinagar
Selenium
Coded UI
Mobile automation testing
Mobile testing
JQuery
JavaScript
.Net
C
C++
Components of the .Net framework
Hello World
Literal
Keywords
Variable
Data types
Operators
Branching
Loops
Arrays
Strings
Structures
Enums
Functions
Рекомендации по теме
join shbcf.ru