java

Java related staff

Enums

Enums

Enums are classes

That represents an enumeration which is like a fixed set of constants. 

  • Provides type-safe checking
  • Is impossible to create an invalid enum type without a compile error 

A good example for enums are

  • Days of the week
  • Months of the year
  • The cards in a deck

Sample

public enum Day {
MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY
​}

Usage

How to install Java JDK and set JAVA_HOME in Fedora

In order to install Java JDK in Fedore, please follow this process

Required data

  • development package = development java package that contains the JDK, which includes the JRE and its complements as the javac (the compiler)

Sample data

  • development package = java-1.8.0-openjdk-devel.x86_64

Process

1. Get into the machine and execute this command

Subscribe to RSS - java