+ 1
What is meant by Object In Java?
Can anyone please tell me why Java is a object oriented program why not others like C , C++ , etc and also explain me what is object in java.
2 Answers
+ 3
A class is often something that can be related to the real world, such as âfruitâ. An object is an âinstanceâ of a class. An apple could be considered an object of the fruit class, another object could be an orange.
Itâs not an easy concept to explain nor understand with words alone.
As you gain more coding experience it will make a lot more sense.
Java is considered to be a âpureâ or âcompleteâ object oriented programming language because nearly all programming with Java must be done using classes and objects.
C++ is considered to be an OOP language as well, but you can build a program using procedural programming only (functions, loops), without using classes and objects.
C does not have any concept of classes and objects and therefore is it a procedural programming language only - but still very powerful!
I hope this helps a little.
+ 1
Even Java has basic data type variables that are not objects.