Non Access Modifiers in Java

Access modifiers provide a mechanism for Access Control and different access modifiers can be used to achieve different accessibility. But Non Access Modifiers have nothing to do with accessibility. But it is used to determine specific characteristics of class/variable/methods etc.…

Access Modifiers in Java

Access modifiers (AM) in java help you set the level of access you want for your class, constructor, variables as well as methods. Access levels (Access Control) can be changed by using different access modifiers. There are three access modifiers…

String Builder

A String Builder is like a String but can be modified. String has the drawback that once created it can not be modified. To overcome that problem String Buffer and String builder can be used. Difference between String Buffer and…

Serialization in Java

Java object serialization is used to persist Java objects to a file, database, network, process or any other system. Serialization flattens objects into an ordered, or serialized stream of bytes. The ordered stream of bytes can then be read at…

Constructor in Java

Constructors in Java can be seen as a special method in a class. But there is a big difference between Constructor and Method. These differences can be defined in terms of purpose,  syntax, and invocation. A constructor is used in…

Inner Class

Java Inner classes are classes within class. An inner class instance has a special relationship with outer class. This special relationship gives inner class access to a member of the outer class as if they are the part of the…

Inheritance

Java Inheritance defines an is-a relationship between a superclass and its subclasses. This means that an Object of a subclass can be used wherever an object of the superclass can be used. Class Inheritance in Java is used to build…

Java Method Override

A class inheriting the method from its superclass has the option to override it. The benefit of overriding is the ability to define behavior specific to a particular class. In the case of a concrete subclass, it is forced to implement all methods defined…