Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Carro{
- String marca;
- String modelo;
- int numPassageiros;
- double capCombustivel;
- double consumoCombustivel;
- void exibirAutonomia() {//vai apenas exibir a msg, sem retornar nhm valor
- System.out.println("A autonomia do carro é: "+capCombustivel * consumoCombustivel+ "km");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement