Can someone help me with this? Im new to coding.. | Sololearn: Learn to code for FREE!

0

Can someone help me with this? Im new to coding..

https://code.sololearn.com/cPpWYgs5mgXM/?ref=app

8/10/2018 3:20:51 PM

Jinyoongisaranghe

2 Answers

New Answer

+11

import java.util.Scanner; public class Vehicle { int fuel; String colour; String brand; int getFuel() { return fuel; } void setFuel(int f) { fuel = f; } } public class tryhard { public static void main(String[] args) { Vehicle obj=new Vehicle(); Scanner wc = new Scanner(System.in); System.out.println("Enter price number of your fuel"); obj.setFuel(wc.nextInt()); System .out.println(obj.getFuel()); } }

0

thanks a lot🤗