+ 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.

4th Jan 2021, 5:23 AM
Dinesh S
Dinesh S - avatar
2 Antworten
+ 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.
4th Jan 2021, 6:00 AM
Elizabeth Kelly
Elizabeth Kelly - avatar
+ 1
Even Java has basic data type variables that are not objects.
4th Jan 2021, 10:22 AM
Sonic
Sonic - avatar