Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Car
- {
- // Simple eg. car class, has model variable and it can get and set the model.
- private String model;
- private String colour;
- public String getModel(){
- return model;
- }
- public String getColour(){
- return colour;
- }
- public void setModel(String m){
- model= m;
- }
- public void setColour(String c){
- colour= c;
- }
- }
Add Comment
Please, Sign In to add comment