Inheritance enables programmers to define an "is-a" relationship between a class and a more specialized version of that class. For example, if a Student class extends a Person class, then it should be the case that Student is-a Person. The subclass Student builds on the functionality of the superclass Person.
//superclass
public class Person{
}
//subclass
public class Student extends Person{
}
The student class extends the person class and therefore inherits its state and behaviors.

