Java Programming: Create an Object from a Vehicle Class and Print it - Step by Step Tutorial

preview_player
Показать описание
In this video I create a class named Vehicle which has 4 private properties: brand, color, year, and price. I also create setters and getters (mutators and accessors). I instantiate that class by creating an object named vehicle and access the properties from the Vehicle class through the object vehicle. The output is shown when the program is run.
Рекомендации по теме
Комментарии
Автор

Hey can I use sc.nextInt in place of input.next

funrun
welcome to shbcf.ru