java 键盘输入字符串 Scanner sc =new Scanner(System.in); String line =sc.nextLine();//有空格的 String line =sc.next();//无空格的 定义数组及初始化; int[] arr = new int[5];//5必须有; int[] number = {1,2,3,5,8};//直接赋值; int[][] dp = new int[m][n];//定义二维数组