Computer Science, asked by Nanda12345, 2 months ago

what are the advantages of classes in Java ​

Answers

Answered by nidaeamann
1

Explanation:

The main advantage of classes is the convenience in their usage and how they can be used to perform certain repetitive task. In Java. there are classes which contains ready to use objects.  

In object-oriented programming, a class is a set of objects, data structures and then the variables of each type are created in it. A class can also have some functions or methods. The keyword class is used to define a class  

Answered by dreamrob
0
  • Class is a collection of objects which has some properties and their behaviors.
  • A class in Java is a blueprint or prototype which includes all the data (variables and methods)
  • It is a basic concept of OOPs.
  • OOPs stands for Object-Oriented Programming.
  • A class tells how an object will work and what it will contain.
  • The class provides the concept of data hiding (Encapsulation), i.e., Wrapping up of data members (properties) and member functions (behaviors) in a single unit named class.
  • It also supports the concept of Inheritance. Acquiring the properties and methods, which provides reusability of cod_e.
Similar questions