Skip to main content

Posts

Showing posts from 2011

Java Enum in 10 Minutes

This tutorial aims at teaching Java enums to newbies in 10 mins. To meet this goal I will keep my descriptions short and concise. References will be provided at the end of the tutorial for detailed study. Concept 1 : Enums are introduced in Java 1.5 and are used to define constants. Scenario 1: Defining Constants public enum WeekDay{     MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY,     SUNDAY; }