Home / Tag Archives: OOPS Concepts in java

Tag Archives: OOPS Concepts in java

Object and Classes in java

Object and Classes Since Java is an object oriented language, complete java language is build on classes and object. Java is also known as a strong Object oriented programming language(oops). …

Read More »

Methods in Java

Method describe behavior of an object. A method is a collection of statements that are group together to perform an operation. Syntax : return-type methodName(parameter-list) { //body of method } …

Read More »

Constructors in Java

Constructors in Java A constructor is a special method that is used to initialize an object.Every class has a constructor, if we don’t explicitly declare a constructor for any java …

Read More »

Garbage Collection in java

In Java destruction of object from memory is done automatically by the JVM. When there is no reference to an object, then that object is assumed to be no longer …

Read More »

What is modifiers in Java ?

Modifiers are keywords that are added to change meaning of a definition. In Java, modifiers are catagorized into two types, Access control modifier Non Access Modifier 1) Access control modifier …

Read More »

Inheritance (IS-A) IN Java

Inheritance (IS-A) Inheritance is one of the key features of Object Oriented Programming. Inheritance provided mechanism that allowed a class to inherit property of another class. When a Class extends …

Read More »

Aggregation (HAS-A) in java

Aggregation (HAS-A) HAS-A relationship is based on usage, rather than inheritance. In other words, class A has-a relationship with class B, if code in class A has a reference to …

Read More »

Method Overriding In Java

Method Overriding When a method in a sub class has same name and type signature as a method in its super class, then the method is known as overridden method. …

Read More »

Runtime Polymorphism or Dynamic method dispatch

Dynamic method dispatch is a mechanism by which a call to an overridden method is resolved at runtime. This is how java implements runtime polymorphism. When an overridden method is …

Read More »

instanceof operator

In Java, instanceof operator is used to check the type of an object at runtime. It is the means by which your program can obtain run-time type information about an …

Read More »

Command line argument in Java

The command line argument is the argument passed to a program at the time when you run it. To access the command-line argument inside a java program is quite easy, …

Read More »

Java Package

Package are used in Java, in-order to avoid name conflicts and to control access of class, interface and enumeration etc. A package can be defined as a group of similar …

Read More »

Abstract class in java

If a class contain any abstract method then the class is declared as abstract class. An abstract class is never instantiated. It is used to provide abstraction. Although it does …

Read More »

Interface In Java

Interface Interface is a pure abstract class.They are syntactically similar to classes, but you cannot create instance of an Interface and their methods are declared without any body. Interface is …

Read More »