Use of ‘this’ and ‘super’ keywords in java

this keyword: Suppose the variable within the class and the parameter passing to the method within the same class are the same. If we try to store a value to the class level variable from within that method then we will use ‘this’ keyword as below. Class  Car {String color;public void blueCar(String color){this.color=color;}public String getColor(){return …

Reference variables and de-referencing.

The following blocks will help to understand the reference variable and de-referencing using java. We have created Ball class with constructor and then created object with this class to understand the reference variables. class Ball {private String color;public Ball(String color) {this.color = color;}} public class Main { public static void main(String[] args)Ball blueBall = new…