顺序 package>import>class

 1 package com.test;
 2 
 3 import java.util.Scanner;
 4 
 5 public class ScannerTest{
 6     public static viod main(String[] args){
 7         //先创建Scanner对象
 8         Scanner sc = new Scanner(System.in);
 9         
10         //接收数据
11         int a = sc.nextInt();
12         
13         //打印数据
14         System.out.println(a);
15     }
16 }

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-08
  • 2022-12-23
  • 2021-10-11
  • 2021-10-09
猜你喜欢
  • 2022-12-23
  • 2021-10-15
  • 2021-11-13
  • 2021-05-21
  • 2021-04-29
  • 2021-12-16
  • 2021-08-02
相关资源
相似解决方案