if-else keywords in Java

The ” if-else ” construct is used to check if the given condition is met then do something, otherwise do something else. The syntax looks like below: if (boolean condition) {       // do something if condition is met   } else {       // do something else if condition is […]

Share this article on

enum keyword in java

The ” enum ” keyword is used to define a fixed set of constants. enum keyword is introduced in Java 5. It can be used for set of status in the application, set of some constant names in the project etc. The general syntax for an enum type is as follows: enum <enum_name> {   […]

Share this article on
< Previous Next >