Any C++ programmer would say, an instance of a class is known as object, when asked what an object is. It is a very confusing statement for a novice. I explain in my own way. Now imagine there is trunk of wood. The wood as it is waste until and…
In Java, object creation is known as instantiation because an instance of a class is object. Let us explain more through Instantiate Java.
public class Demo
public static void main(String args)
Demo d1 = new Demo();
In the above code, d1 is known as object of Demo class. Other way, we can say, d1 object is instantiated. In my own way, I…