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

Scanner 获取数据

时间:2016-01-26 01:38:05      阅读:206      评论:0      收藏:0      [点我收藏+]

标签:

1.next 字符串

2.nextLine 字符串

3.nextInt 整型

4.nextDouble 双精度类型

5.nextBoolean 布尔类型

6.next或者nextLine 

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

Scanner 获取数据

标签:

原文地址:http://www.cnblogs.com/214829qw/p/5159165.html

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