. . .

Tag: Java elements

What is constructor in java?

Constructors A constructor initializes an object with its creation. It has the same name as the name of its class. Once a constructor is defined, it is automatically called immediately the memory is allocated before the new operation completes. A constructor does not have any return type, its implicit return type is a class object. […]

Abstract Class in java

when we extending an existing class, we have a choice whether to redefine the methods of the superclass. Abstract classes in java Basically a superclass has common features that are shared by subclasses. In some cases, you will find that superclass cannot have any instance (object) and such classes are called abstract classes. Abstract classes […]