KnowledgeBoat Logo
|

Computer Applications

Why are classes needed ?

Java Classes

7 Likes

Answer

In Java, the class forms the basis of all computation. A class is a blueprint for an object and an object is an instance of a class. It allows a programmer to define all of the properties and methods that define an object.

Anything that has to exist as a part of a Java program has to exist as a part of a class, whether that is a variable or a function or any other code-fragment. Without classes, there can be no objects and without objects, no computation can take place in Java. Thus, classes form the basis of all computation in Java.

Answered By

5 Likes


Related Questions