Advanced Java Programming - Old Questions
4. Define class. How do you create a class in Java? Differentiate class with interface.
5 marks
|
Asked in 2076
A class is a user defined blueprint or prototype from which objects are created. It represents the set of properties or methods that are common to all objects of one type.
To create a class, use the keyword class.
Syntax:
Class vs Interface