Advanced Java Programming - Old Questions

Question Answer Details

4. Define class. How do you create a class in Java? Differentiate class with interface.

5 marks
Asked in 2076

Answer

AI Generated Answer

AI is thinking...

Official Answer

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