Scanner 获取数据

1.next 字符串

2.nextLine 字符串

3.nextInt 整型

4.nextDouble 双精度类型

5.nextBoolean 布尔类型

6.next或者nextLine 

charAt() 方法:   String char=“abc”;     char.charAt(0)=a;

posted on 2016-01-26 00:53  ip权  阅读(195)  评论(0编辑  收藏  举报