Call by value in java
In java, we have only ‘Call by value’, not ‘Call by reference’. In ‘Call by reference’ the address of the value is passed in the arguments of the methods, so if any changes made...
Software Programming Guide
In java, we have only ‘Call by value’, not ‘Call by reference’. In ‘Call by reference’ the address of the value is passed in the arguments of the methods, so if any changes made...
Encapsulation is one of the four fundamental OOP concepts. Remaining three are inheritance, polymorphism, and abstraction.In the previous post, we have studied the Abstract class and interface. In this post, we will focus on encapsulation....
In the previous post, we have seen Initializer Block.In this post , we will see what is polymorphism in Java. In object oriented programming, we know it is best at providing the reusability of the...
Initialization blocks as name says can be used to initialize the objects or data members in java. An initialization block contains a group of statements enclosed in a pair of braces. Syntax : {...
In the previous session, we have seen the usage of method overriding. In this session, we will see how to use the keyword super in java programming. The super keyword is used to refer immediate parent class members....
In parent class we have a method, and the same method is declared in child class is known as method overridding. Before we have seen method overloading, now we will discuss method overriding in...
Every class has one or more methods which are used to perform different functionalities in the application. Can we have two methods having the same name in one class? Yes, we can have two or more methods...
The most important advantage of Object oriented programming is code reusability. Aggregation means making a relationship or association between 2 classes. There is one directional association between the classes that represent Has-A relationship. As an example suppose,...
In java, this keyword is used as a reference of the current object. Here are few important usage of this keyword. this keyword represent current instance of the class. this can be used to call default constructor or...
In java, there are 4 types of access modifiers which are as follows. Public Private default protected We check their accessibility at 4 levels which are. Class level Subclass level Its own Package level...