Skip to content
sneppets

sneppets

  • Privacy

Enums in Java

March 19, 2018December 8, 2018 Editorial StaffLeave a Comment on Enums in Java

An enum type is a special data type in java used to define collections of constants. More precisely as of Java 5, Java lets you restrict a variable to have one of only a few pre-defined values – in other… Read More!

Java core java, enums

Use Interface in Java

March 17, 2018December 8, 2018 Editorial StaffLeave a Comment on Use Interface in Java

A class that contains only abstract methods and no concrete methods becomes an interface.

Java core java, interface

Abstract Classes in Java

March 12, 2018March 17, 2019 Editorial StaffLeave a Comment on Abstract Classes in Java

An abstract class is a class that is declared abstract—it may or may not include abstract methods. Abstract classes cannot be instantiated, but they can be subclassed. Why to make a class if you can’t make objects out of it? Because no one… Read More!

Java core java, java
final class java

Use of final class in Java

March 11, 2018December 8, 2018 Editorial StaffLeave a Comment on Use of final class in Java

A final keyword means the class cannot be subclassed. In other words, no other class can ever extend a final class. And many of the Java standard library classes are final, such as java.lang.System  and java.lang.String . When you would mark a… Read More!

Java core java
static import java

Static Import Statements in Java

March 11, 2018December 8, 2018 Editorial StaffLeave a Comment on Static Import Statements in Java

Static Import feature was introduced in Java 5. This feature provides a typesafe mechanism to include constants into code without having to reference the class. Although some would argue that it comes at the expense of readability. When to use… Read More!

Java core java, java

Posts navigation

Older posts
Newer posts
Copyright © 2018 Sneppets. All Rights Reserved