Java 1.5 New Features | Java In Hindi | Java By Surya Sir | Java 1.5
What is Enum in Java | Difference Between enu Vs. Enum Vs. Enumeration 1.5 Features | Java In Hindi
Java Enums
The Enum in Java is a data type which contains a fixed set of constants.
It can be used for days of the week (SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, and SATURDAY) , directions (NORTH, SOUTH, EAST, and WEST), season (SPRING, SUMMER, WINTER, and AUTUMN or FALL), colors (RED, YELLOW, BLUE, GREEN, WHITE, and BLACK) etc. According to the Java naming conventions, we should have all constants in capital letters. So, we have enum constants in capital letters.
Java Enums can be thought of as classes which have a fixed set of constants (a variable that does not change). The Java enum constants are static and final implicitly. It is available since JDK 1.5.
Enums are used to create our own data type like classes. The enum data type (also known as Enumerated Data Type) is used to define an enum in Java. Unlike C/C++, enum in Java is more powerful. Here, we can define an enum either inside the class or outside the class.
Java Enum internally inherits the Enum class, so it cannot inherit any other class, but it can implement many interfaces. We can have fields, constructors, methods, and main methods in Java enum.
#androjavatech4u
For Online Live Training Contact me directly on - 9310683500 (Available on What's App Also)
In this video, we'll talk all about sealed classes and interfaces in Java. One of the main delimmas of an object oriented designer is how much extension should an API allow. Sealed class and interfaces offer a way to walk the balance between locking down your code vs opening it up wide to extension. Hope you like the video!
In this video, we go over the most useful and important new features that have been introduced in Java 17 and in the most recent Java 17
java Basic Java Tutorial for beginners
Basic Java Programming for beginners
#androjavatech4u
Stay tuned with me for more upcoming Videos,
don't forget to subscribe my RU-vid Channel and share your valuable comments in Comment section down below, i'll be happy t o help you all, your Surya ☺
Important Videos:
➡️ • Record Class In Java 1...
➡️ • Multi Threading Part-1...
➡️ • Multi Threading Part-1...
➡️ • #17 What is ORM , Hibe...
Important Playlist:
➡️ • #01 Java 8 Features in...
➡️ • #1 What is Software Te...
➡️ • Core Java Online Train...
➡️ • #1 Introduction to Spr...
➡️ • Design Patterns In Jav...
Connect on Socials (FOLLOW ME ON)
Facebook 👉 / androjavatech4u
Twitter 👉 / androjavatech4u
Google Plus 👉 plus.google.co...
LinkedIn: 👉 / androjavatech4u
Telegram 👉 telegram.me/An...
Whtats App 👉 whatsapp.com/c...
29 сен 2024