Why should you create Objects in Java? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why should you create Objects in Java?

7th Aug 2018, 2:09 PM
Erwin Vieselowski
Erwin Vieselowski - avatar
5 Answers
+ 4
Java is the most widely used object-oriented programming (OOP) language in 2016. OOP is a programming model based on the concept of “objects” which are simply data structures that have fields, or attributes, that hold information (data) about themselves and methods they can perform.
7th Aug 2018, 2:57 PM
Scooby
Scooby - avatar
+ 3
As i know User defined classes combine the data and methods that operate on that data and dont know in details still noob at java.. i am just try to help with my little knowledge.. as i also know "little knowledge is a dangerous thing" ☺ Erwin Vieselowski
7th Aug 2018, 3:03 PM
Scooby
Scooby - avatar
+ 1
Scooby thats pretty much what google said but i mean if you create a new class with attributes and create objects in main with these attributes
7th Aug 2018, 2:59 PM
Erwin Vieselowski
Erwin Vieselowski - avatar
+ 1
Scooby i'm the one with little knowledge but thank you
7th Aug 2018, 3:26 PM
Erwin Vieselowski
Erwin Vieselowski - avatar
0
Erwin Vieselowski it is for reusability and accessibility, thinking of programming concepts as real life objects helps to ease the learning curve when delving into programming. it also helps to reinforce encapsulation the hiding of data within an object and ensuring that its data is only accessed and manipulated through use of that object.
7th Aug 2018, 5:16 PM
Robert Atkins
Robert Atkins - avatar