What is a class in java?

DWQA QuestionsCategory: QuestionsWhat is a class in java?
Editor Staff asked 3 weeks ago

What is a class in java?

1 Answers
Editor Staff answered 3 weeks ago

A class–the basic building block of an object-oriented language such as Java–is a template that describes the data and behaviour associated with instances of that class. When you instantiate a class you create an object that looks and feels like other instances of the same class. The data associated with a class or object is stored in variables; the behaviour associated with a class or object is implemented with methods.