Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package com.mycompany.ja7;
- public class Car {
- // свойства
- // цвет, масса, текущая скорость авто
- // цвет
- private String color;
- // масса
- private double m;
- //текущая скорость авто
- private double speed;
- // методы
- // get, set - методы
- // get
- public String getColor(){
- return color;
- }
- // Alt+Insert
- public double getM() {
- return m;
- }
- public double getSpeed() {
- return speed;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement