package com.cici.common; import java.io.BufferedReader; import java.io.InputStreamReader; public class SystemIn { public static int readInt(){ BufferedReader br = null; try{ br = new BufferedReader( new InputStreamReader( System.in) ) ; String line = br.readLine(); int ret = Integer.parseInt( line ); return ret ; }catch( Exception e ){ e.printStackTrace(); return -1 ; } } public static double readDouble(){ BufferedReader br = null; try{ br = new BufferedReader( new InputStreamReader( System.in) ) ; String line = br.readLine(); double ret = Double.parseDouble( line ); return ret ; }catch( Exception e ){ e.printStackTrace(); return -1 ; } } public static String readString(){ BufferedReader br = null; try{ br = new BufferedReader( new InputStreamReader( System.in) ) ; String line = br.readLine(); return line ; }catch( Exception e ){ e.printStackTrace(); return null; } } } class Test{ public static void main( String args[] ){ int i = SystemIn.readInt(); double d = SystemIn.readDouble(); String s = SystemIn.readString(); System.out.println( i + "\t" + d + "\t" + s ) ; } }
public class SystemInApp{ public static void main(String[] args) throws Exception { System.out.println("Please insert the pageNO :"); int pageNo = SystemIn.readInt(); System.out.println("Please insert the lineMount :"); int lineMount = SystemIn.readInt(); System.out.println("Please insert the listMount :"); int listMount = SystemIn.readInt(); }