Method Overloading is a feature that allows a class to have multiple methods with the same name but with different number, sequence or type of… [Read More]
Interface in java with example programs
In the last tutorial we discussed abstract class which is used for achieving partial abstraction. Unlike abstract class an interface is used for full abstraction…. [Read More]
Abstract Class in Java with example
A class that is declared using “abstract” keyword is known as abstract class. It can have abstract methods(methods without body) as well as concrete methods… [Read More]
Inner classes in java: Anonymous inner and static nested class
What is an inner class? Inner class are defined inside the body of another class (known as outer class). These classes can have access modifier… [Read More]
Java static import with example
Static import allows you to access the static member of a class directly without using the fully qualified name. To understand this topic, you should… [Read More]
Java static constructor – Is it really Possible to have them in Java?
Have you heard of static constructor in Java? I guess yes but the fact is that they are not allowed in Java. A constructor can not… [Read More]
Java – static variable with example
A static variable is common to all the instances (or objects) of the class because it is a class level variable. In other words you… [Read More]
Difference between static and non-static members in Java
Java is a Object Oriented Programming(OOP) language, which is often interpreted that we need objects to access methods and variables of a class, however this… [Read More]
Difference Between Abstract Class and Interface in Java
In this article, we will discuss the difference between Abstract Class and Interface in Java with examples. I have covered the abstract class and interface in… [Read More]
Java Access Modifiers – Public, Private, Protected & Default
You must have seen public, private and protected keywords while practising java programs, these are called access modifiers. An access modifier restricts the access of… [Read More]