---
title: "What is enum datatype in java"  
description: "What is enum datatype in java"  
author: "Anonymous User"  
published: 2015-07-14  
updated: 2020-09-18  
canonical: https://www.mindstick.com/interview/2699/what-is-enum-datatype-in-java  
category: "java"  
tags: ["java"]  
reading_time: 1 minute  

---

# What is enum datatype in java

Enum keyword is used to represent a fixed number of related values. Since enum constants are implicitly static and final,there values can't be changed once they are created.

```
public enum Day { SUNDAY, MONDAY, TUESDAY, WEDNESDAY,THURSDAY, FRIDAY, SATURDAY }// Uses public void weekDay() { switch (day) { case MONDAY: System.out.println("Mondays are bad."); break; }}
```

## Answers

### Answer by Anonymous User

Enum keyword is used to represent a fixed number of related values. Since enum constants are implicitly static and final,there values can't be changed once they are created.

```
public enum Day { SUNDAY, MONDAY, TUESDAY, WEDNESDAY,THURSDAY, FRIDAY, SATURDAY }// Uses public void weekDay() { switch (day) { case MONDAY: System.out.println("Mondays are bad."); break; }}
```


---

Original Source: https://www.mindstick.com/interview/2699/what-is-enum-datatype-in-java

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
