Q. A class in Java is a:

A
An instance of an object
B
A blueprint or template for creating objects
C
A primitive data type
D
A method that returns a value
Solution:

A class is the fundamental building block of an object-oriented program. It defines the properties (fields) and behaviors (methods) that objects of that type will have.

Entri Contact Image

Get Expert Advice for Free: Register for Your Free Consultation Now!