charge.java package hello;import java.util.Scanner;public class charge {public static void main(String[] args) {// TODO Auto-generated method stubSystem.out.println("您好");Scanner in = new Scanner(System.in);int price = 0;int amount = 10
package hello; import java.util.Scanner; public class charge { public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("您好"); Scanner in = new Scanner(System.in); int price = 0; int amount = 1000;//final int means const System.out.print("请输入总额:"); amount=in.nextInt(); System.out.print("请输入金额:"); price=in.nextInt(); System.out.println("找零:"+amount+"-"+ price+"="+ (amount-price));// ""+a.b } }输入声明?
Scanner in = new Scanner(System.in);