Object Oriented Programming - JAVA - Abstract / Abstract classes
Object Oriented Programming - JAVA👽 Abstract / Abstract classes ..... Abstraction in OOPS is used to hide unnecessary information and show only necessary information to interacting users. We can modify a class or method into abstract class or abstract method using Abstract keyword. Let's continue this discussion using example code in the below. class Vehicle { void park(){ } } class Bicycle extends Vehicle { void park(){ // break // putting a foot on the ground // getting off the bike } } A bodyless method is in the Vehicle class because it needs to be overridden. Open and closing curly brackets are not needed for the method because it is bodyless. But we can't use like void park(); , That's why we look like a command using method run. When we use Abstract keyword, we can show bodyless methods without open and closing curly brackets. So we can show that "...