java 基础 scanner 的使用
package test;
import java.util.Scanner;
public class Hello {
public static void main(String[] args) {
int i;
double d;
Scanner in = new Scanner(System.in);
i = in.nextInt();
d = in.nextDouble();
System.out.println("int="+i);
System.out.println("double="+d);
System.out.println("强制转换="+(int)d);
}
}