Oops Concepts
Oops Concepts
// Behavior (method)
void start() {
System.out.println(brand + " is starting.");
}
}
What is an Object?
An object is an instance of a class. It is a
real-world entity that has a state (values of
variables) and behavior (methods).
TERMINOLOGIES
1. Superclass
Java Inheritance Types
Single Inheritance
Multilevel Inheritance
Hierarchical Inheritance
Multiple Inheritance
Hybrid Inheritance
Single Inheritance
class Father {
void show() { System.out.println("I am the Father."); }
}
class Grandfather {
void greet() { System.out.println("I am the Grandfather."); }
}
class Father {
void show() { System.out.println("I am the Father."); }
}