What is class/object diagram ?

Java Class:

  • A class is an entity that determines how an object will perform and what the object will contain.
  • In other words, it is a blueprint or a set of instruction to build a specific type of object.
 Class and Object Diagram

Syntax:

class ClassName {
// variables
// methods
}

Java Objects:

  • When class is defined, only the condition for the object is defined.
  • No memory or storage is allocated.
  • To access members defined within the class, you need to create objects.

Syntax:

ClassName ReferenceVariable = new ClassName();

Categorized in:

Tagged in:

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,