Core Java Development Course for Beginners - Part 9 - Enum | Udayan Khattry | Skillshare

Core Java Development Course for Beginners - Part 9 - Enum

Udayan Khattry, SCJP, SCWCD & Oracle Database SQL Certif

Play Speed
  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x
5 Videos (52m)
    • Introduction to Enums

    • Constructors Variables Methods

    • Enum and switch case block

    • valueOf ordinal compareTo

    • Override Enum Methods


About This Class


This course is for anyone who wants to learn Java from scratch, polish java skills, face java interviews and prepare for java certifications.

Anyone can take this course and go from 0 developments skills to being expert in OOPs and core Java.
Java is the most popular language world wide and technologies like Servlets & JSP, J2EE, Struts, Spring, Hibernate, JMS or android for mobile applications are all based on core Java. 
Even Kotlin (android's new programming language) becomes easier if you know Java.

Having a sound understanding of core java concepts is necessary, if you want to learn advance concepts, frameworks and android programming.

Following Lectures are covered in Part-9


1.            Introduction to Enums

In this lecture you will learn:

  • What are enums and why enums were added in Java?
  • Limitations of using String constant variables for fixed set of values.
  • The syntax of Java enum.
  • Similarities and differences between enums and java classes.
  • What is java.lang.Enum class?
  • Eclipse IDE shortcut to change the selected text's case (upper or lower).

2.            Enums: Constructors, instance variables and methods

In this lecture you will learn:

  • Why variables, constructors and methods are needed in the Enum code?
  • How to define variables, constructors and methods in the Enum code?
  • Code to invoke the parameterized constructor of an Enum.
  • When does java runtime invoke the constructor of an Enum?
  • How to invoke methods defined in an Enum?
  • Static values() method of Enums.
  • Benefits of enums over static final variables.

3.            Enum and switch-case block

In this lecture you will learn:

  • How to associate multiple values with Enum constants?
  • switch-case syntax for Enums.
  • Two ways to declare Enums.
  • When to use full name and when to use shorthand notation to access Enum constants?
  • Benefits of enums over static final variables.

4.            Enum: valueOf, ordinal and compareTo methods

In this lecture you will learn:

  • Working of static valueOf(String) method.
  • How to check the details of values() and valueOf(String) methods using Javadoc?
  • How Enum constants are declared internally?
  • What is ordinal value?
  • Three ways to check for the equality of Enum constants.
  • Working of instance methods: ordinal() and compareTo().

5.            Override Enum methods

In this lecture you will learn:

  • Why it is needed to override Enum methods?
  • Syntax to override Enum methods.
  • Constant specific class body and its use.





  • --
  • Beginner
  • Intermediate
  • Advanced
  • All Levels
  • Beg/Int
  • Int/Adv


Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.

Udayan Khattry

SCJP, SCWCD & Oracle Database SQL Certif

Hi, I'm Udayan. I have a master's degree in Computer Applications from Symbiosis International University, Pune, India and have completed following professional certifications:
- SCJP 1.6 (Sun Certified Programmer for J2SE 6.0)
- SCWCD 1.5 (Sun Certified Web Component Developer)
- Oracle Database SQL Certified Expert

After working as a software developer and consultant for over 9 years for various companies in India, Dubai & Singapore, I decided to follow my lifelong passion ...

See full profile

Report class