sin=in.readLine();

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());} } }

 

posted @ 2014-10-01 17:20  fantasy12436109  阅读(544)  评论(0编辑  收藏  举报