Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package kwiecien.dziewiaty;
- public class Car {
- String name;
- String color;
- String engine;
- public Car() {
- }
- public Car(String name, String color, String engine) {
- this.name = name;
- this.color = color;
- this.engine = engine;
- }
- public void printCar(){
- System.out.println("Nazwa: " + name + ", kolor: " + color + ", silnik: " + engine);
- }
- public void switchCarName(String carName){
- this.name = carName;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement