It follows the concepts of oops.
The main method in java is static. As we compile the program it starts compilation from main only. Object cannot be created for main method.
Class vehicle {car(){}bus(){}}class properties extends vehicle {wheel(){}speed(){)}class A{public static void main(string arga{}){properties pr= new properties()pr.speed();pr.car();}}