. . .

Month: September 2019

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 […]

How to make a new object in java?

software object in java Each software objects in java contain data and the functions that operate on the data. Objects can interact without having to know details of each other’s data or functions. It is sufficient to know the type of message accepted and the type of response returned by the software object in java. […]

Explain Polymorphism with suitable examples?

Polymorphism Polymorphism means the ability to take more than one form of the same property. For example, consider an addition operation. It shows different behavior in different types of data. For two numbers, it will generate a sum. The numbers may integers or float. Thus the addition for integers is different from the addition to […]

Explain Inheritance with a suitable example?

Inheritance Inheritance is the process by which objects. It means One class acquire the properties of objects of another class in the hierarchy. For example, the scooter is a type of class two-wheelers, which is again a type of (or kind of) the class motor vehicles. As shown in the Figure the principle behind it […]

What are the Basic Concepts Of Object-Oriented approach?

Object-Oriented approach Let’s start with “Object”. The Basic Concepts Of Object-Oriented approach first thing that we should do in the Object-Oriented approach is to start thinking in terms of Objects. The problem to be solved is divided into objects. Start analyzing the problem in terms of objects and the nature of communication between them. Program […]