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!
A class that contains only abstract methods and no concrete methods becomes an interface.
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!
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!
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!