java 怎么实现接收控制台输入?
//接收键盘输入: //怎么实现接收控制台输入? import java.util.Scanner; //Test.java import java.util.Scanner; public class Test16{ public static void main(String args[]){ System.out.println("input a number:"); Scanner in =new Scanner(System.in); int x1=in.nextInt(); System.out.println("input a number:"); int x2=in.nextInt(); int x3=x1+x2; System.out.println("x1+x2="+x3); } }
无语言基础,自学python所做的各种笔记,欢迎大牛指点.