首页 > 代码库 > sin=in.readLine();

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

 

sin=in.readLine();