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

sin=in.readLine();

时间:2014-10-01 18:56:21      阅读:200      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   color   io   os   ar   java   数据   

import java.io.*;
public class LineIO{
   public static void main(String[] args) {
    String sin,inputString;
        int inputInteger;
        double inputDouble;

    System.out.println("输入一个字符串:");
        try{
          BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
          sin=in.readLine();
          inputString=sin;

System.out.println(
"输入一个整数:"); sin=in.readLine(); inputInteger=Integer.parseInt(sin);
System.out.println(
"输入一个小数:"); sin=in.readLine(); inputDouble=Double.parseDouble(sin);
System.out.println(
"输入数据为:"); System.out.println(inputString+"\t"+inputInteger+"\t"+inputDouble); }catch(IOException e){System.out.println(e.toString());} } }

 

bubuko.com,布布扣

sin=in.readLine();

标签:style   blog   http   color   io   os   ar   java   数据   

原文地址:http://www.cnblogs.com/fantasy12436109/p/4003396.html

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