SHARE
TWEET

in our class java

imtiazaasif Jan 27th, 2020 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class car {
  2.     public String model;
  3.     public int speed;
  4.     public float price;
  5.     public String color;
  6.    
  7.     public void setModel(String mod) {
  8.         model=mod;
  9.     }
  10.     public void getModel() {
  11.         return model;
  12.     }
  13.     public void showCar() {
  14.         System.out.println("model is :"+model);
  15.         System.out.println("speed is:"+speed);
  16.         System.out.println("price is: "+price);
  17.         System.out.println("color is: "+color);
  18.     }
  19.    
  20.  
  21. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top