Why we want to use class in java program | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why we want to use class in java program

27th Aug 2020, 10:38 AM
Nithyananthan
4 Answers
+ 4
Nithyananthan Java is object oriented programming language so here we can perform operations only in a class. class is the basic concept of OOPs. A class is defined as a blueprint/prototype. You can create an individual object by use of a class. A class can represent the set of properties and methods they are common for all the objects of a class. In Java class, we define a pattern/blueprint which is followed by every object. Before moving further we must need to know what does java class consists? What’s the mean of blueprint here? Here is the blueprint print of java class that consists of a number of things. https://javagoal.com/class-and-object-in-java/#1
28th Aug 2020, 1:27 AM
Raina Dhankhar
Raina Dhankhar - avatar
+ 1
Please tag a relevant language (Java) not just a question mark ☝
27th Aug 2020, 10:55 AM
Ipang
+ 1
All your bytecode in Java actually starts from a class name, which includes main method, I mean it's the rule.. You can also create various classes and create an object for it which is what the essence of OOPS (Java), hope this helped :))
27th Aug 2020, 11:04 AM
RuntimeERROR
RuntimeERROR - avatar
0
Java is purely object oriented programming language... So it's based on mainly Oops principles.. One of 7 Oops principle is Class. Class mechanism provides Encapsulation data feature.. So Every java program must contain atleast one class..
27th Aug 2020, 12:34 PM
Jayakrishna 🇮🇳