For-Each

Var-arg

Queue

Generics

Auto boxing and Auto unboxing

Co-varient return types

Annotations

Enum

Static import

String builder
Usually we can access static members by using class name but whenever we are using static import it is not require to use class name we can access directly.

Whenever we are writing our own classes compulsory we have to provide some information about our class to the jvm. Like

Better this class can be accessible from anywhere or not.

Better child class creation is possible or not.

Whether object creation is possible or not etc.

We can specify this information by using the corresponding modifiers.

The only applicable modifiers for Top Level classes are:

Public

Default

Final

Abstract

Strictfp

• If we are using any other modifier we will get compile time error.


Leave a comment

Design a site like this with WordPress.com
Get started