What is a Class in Java?
A class in Java is like a blueprint or template used to create objects.
It defines the properties (variables/fields) and behaviors (methods/functions) of an object.
Without a class, we cannot create objects in Java.
Components of a Class
Fields (Variables): Used to store data.
Methods (Functions): Used to perform actions.