What Are Class, Object, Instance, Reference, Abstraction, Encapsulation, Polymorphism And Inheritance In Java?
CLASS A class is a user-defined data type. Sometimes in object-oriented programming basic data types are not enough to accomplish our needs. In such cases we can create our own data types like classes and structures. Within the class we can have data members and member functions of the class. OBJECT and INSTANCE To make use of the newly created class in your code you have to create an object of the class. An object created of a class is said to be an INSTANCE OF THE CLASS. If you create two objects they are two instances of the same class. REFERENCE There are two ways of passing arguments to functions 1) by value 2) by reference. When an argument is passed by value the called function will create a new variable of this data type and copy the value of the argument into this. For large arrays this is not ideal, as a lot of memory and time is used for copying purposes. In such cases we pass the address in memory where that variable is located. Through the memory address we can directly ac