Tuesday, 8 October 2019

Introduction to classes

Introduction to classes

java,class in java,java tutorial,classes in java,java class,class,java (programming language),object class in java,class and object in java,classes and objects in java,learn java,java classes,java programming,pojo class in java,class class in java,what is class in java,class member in java,java (software),abstract class in java,class creation in java,defining a class in java

What is a class

Object and Class are the two basic principles of Object Oriented Programming

They can be considered as the two sides of a coin, which cannot be disintegrated.

Each object belonging to a class, contains entire set of data and functions included in the class.

Understand concept of classes-

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.

 In general, class declarations can include these components, in order:

Modifiers : A class can be public or has default access.

Class name: The name should begin with a initial character.

Superclass(if any): The name of the class’s parent (superclass), if any, preceded by the keyword extends. A class can only extend (subclass) one parent.

Interfaces(if any): A comma-separated list of interfaces implemented by the class, if any, preceded by the keyword implements. A class can implement more than one interface.

Body: The class body surrounded by braces, { }.

No comments:

Post a Comment