Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class car {
- public String model;
- public int speed;
- public float price;
- public String color;
- public void setModel(String mod) {
- model=mod;
- }
- public void getModel() {
- return model;
- }
- public void showCar() {
- System.out.println("model is :"+model);
- System.out.println("speed is:"+speed);
- System.out.println("price is: "+price);
- System.out.println("color is: "+color);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement