码迷,mamicode.com
首页 > 其他好文 > 详细

控制台接收输入字符

时间:2017-09-11 13:13:55      阅读:133      评论:0      收藏:0      [点我收藏+]

标签:str   div   col   ase   扫描   main   输入   string   static   

1 public static void main(String[] args){
2         Scanner scanner = new Scanner(System.in); //輸入流扫描器
3         System.out.println("Please enter you tel:");
4         String line = scanner.nextLine();
5         System.out.println("the tel length is:"+line.length());
6     }

 

控制台接收输入字符

标签:str   div   col   ase   扫描   main   输入   string   static   

原文地址:http://www.cnblogs.com/jjlyx/p/7504283.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!