Abstract class in Java

A class that is declared with abstract keyword, is known as abstract class in java. It can have abstract and non–abstract methods (method with body) Abstraction in Java Abstraction is a process of hiding the implementation details and showing only functionality to the user Abstraction lets you focus on what the object does instead of … Read more

Inheritance in java

Inheritance in java is a relationship between a superclass: a more generalized class A subclass: a more specialized class The subclass ‘inherits’ data (variables) and behavior (methods) from the superclass Important facts about inheritance in Java Default superclass: Except Object class, which has no superclass, every class has one and only one direct superclass (single … Read more

Java Package

Packages in java are those class which contains methods without the main method in them. Packages are mainly used to reuse the classes which are already created/used in other program We can define many number of classes in the same package Packages are mainly divided into two types Built in packages User defined Packages The … Read more

Classes in java

In java a class is the blueprint from which individual objects are created. Example In object–oriented terms, we say that your bicycle is an instance of the class of objects known as bicycles Java classes contain fields and methods. A field is like a C++ data member, and a method is like a C++ member … Read more

Overloading Methods in java

The Java programming language supports overloading methods, and Java can distinguish between methods with different method signatures. This means that methods within a class can have the same name if they have different parameter lists In the Java programming language, you can use the same name for all the drawing methods but pass a different … Read more

Methods in java

The only required elements of a method declaration are the method’s return type, name, a pair of parentheses, (), and a body between braces, {}. Two of the components of a method declaration comprise the method signature—the method’s name and the parameter types. The return type—the data type of the value returned by the method, … Read more

Need for oop(Object-Oriented Programming) paradigm

The object oriented paradigm is a methodology for producing reusable software components The object–oriented paradigm is a programming methodology that promotes the efficient design and development of software systems using reusable components that can be quickly and safely assembled into larger systems. Object oriented programming has taken a completely different direction and will place an … Read more

Access Modifiers in Java

The access modifiers in Java specifies the accessibility or scope of a field, method, constructor, or class. We can change the access level of fields, constructors, methods, and class by applying the access modifier on it. There are four types of Java access modifiers: Private:The access level of a private modifier is only within the … Read more