publicclassMain{publicstaticvoidmain(String[]args){CarmyCar=newCar("Toyota",2000);myCar.displayInfo();// Make by Toyota in 2000}}classCar{privateStringmake;privateintyear;publicCar(Stringmake,intyear){this.make=make;this.year=year;}publicvoiddisplayInfo(){System.out.println("Make by "+make+" in "+year);}}