亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? userinput.java

?? This is the compiled java norms, these norms of a good programmer is very often used
?? JAVA
?? 第 1 頁 / 共 2 頁
字號(hào):
import java.io.*;

import java.text.DecimalFormat;
import java.util.Scanner;

//##############################################################################
/**
 * The user input class facilitates simple output and input methods in Java that
 * utilise the command line.<br><br>
 * This class facilitates the following fuctions<br><br>
 * <ul>
 * <li>Output to screen
 * <li>Output to file
 * <li>Read from keyboard
 * <li>Read from file
 * <li>Format the output of integer, double and float types (alignment, decimal 
 * places).
 * </ul>
 * 
 * <b>Version: 1.0</b> -  Andrew Scott 2008 
 */
 //#############################################################################
public class UserInput {

	

    private static Scanner kbInput =  new Scanner(System.in);
    private static Scanner input;
    private static File fileInput;
    private static File outputFile;
    
    private static  FileWriter fw;
    private static PrintWriter pw;
    
    public UserInput() { };
    
    
    //==========================================================================
    
    //==========================================================================
    private static Scanner createInput() 
    {
        if (input == null)
         input = new Scanner(System.in);
        return input;
    }//end create input=========================================================
    

    //==========================================================================
    /**
     * Prompts the specified String to the screen, without end-of-line
     * @param s The string to be output.
     */
    //==========================================================================
    public static void prompt (String s) 
    {

            System.out.print(s + " ");
            System.out.flush();

    } // end prompt()===========================================================
    
    //==========================================================================
    /**
    * Prints the specified String to the screen or a file, without end-of-line.
    * <br><br>
    * If the outputFile has been created and the PrintWriter and FileWriter 
    * initialised by the openOutputFile(String name) method then this method 
    * write to the file specified.
    * <br><br>
    * If the outputFile, printWriter and fileWriter objects are null the print
    * method will output to the screen.
    * @param s The string to be output.
    */
    //==========================================================================
    public static void print (String s)
    { 
        if (pw == null || fw == null || outputFile == null)
        {
          System.out.print(s);
          System.out.flush();
        }//end if
        else if (pw != null && fw != null && outputFile != null)
        {
            pw.print(s);
        }//end else if
    } // end prompt()===========================================================
    
    //==========================================================================
    /**
     * Prints the specified String to the screen or a file, with an end-of-line.
     * <br><br>
     * If the outputFile has been created and the PrintWriter and FileWriter 
     * initialised by the openOutputFile(String name) method then this method 
     * write to the file specified.
     * <br><br>
     * If the outputFile, printWriter and fileWriter objects are null the print
     * method will output to the screen.
    * @param s The string to be output.
    */
    //==========================================================================
    public static void println (String s) 
    {
        if (pw == null || fw == null || outputFile == null)
        {
          System.out.println(s);
          System.out.flush();
        }//end if
        else if (pw != null && fw != null && outputFile != null)
        {
            pw.println(s);
        }//end else if
    } // end prompt()===========================================================
    
    /**
     * Prints an int to the screen or file with newLine.
     * @param i the data to be printed
     * @see println(String s)
     */
    public static void println(int i)  {  println( new Integer(i).toString()); }
    
    /**
     * Prints a long to the screen or file with newLine.
     * @param l the data to be printed
     * @see println(String s)
     */
    public static void println(long l) { println(new Long(l).toString());}
    
    /**
     * Prints a short to the screen or file with newLine.
     * @param s the data to be printed
     * @see println(String s)
     */
    public static void println(short s) { println(new Short(s).toString());}
    
    /**
     * Prints a double to the screen or file with newLine.
     * @param d the data to be printed
     * @see println(String s)
     */
    public static void println(double d) { println(new Double(d).toString());}
    
    /**
     * Prints a float to the screen or file with newLine.
     * @param f the data to be printed
     * @see println(String s)
     */
    public static void println(float f) { println(new Float(f).toString()); }
    
    /**
     * Prints a char to the screen or file with newLine.
     * @param c the data to be printed
     * @see println(String s)
     */
    public static void println( char c)  { println(new String(""+ c));}
    
    /**
     * Prints a boolean to the screen or file with newLine.
     * @param b the data to be printed
     * @see println(String s)
     */
    public static void println(boolean b) { println(new Boolean(b).toString());}
    
    /**
     * Prints an integer to the screen or file without newLine.
     * @param i the data to be printed
     * @see print(String s)
     */
    public static void print(int i)  { print( new Integer(i).toString());}
    
    /**
     * Prints a long to the screen or file without newLine.
     * @param l the data to be printed
     * @see print(String s)
     */
    public static void print(long l) { print(new Long(l).toString());}
    
    /**
     * Prints an short to the screen or file without newLine.
     * @param s the data to be printed
     * @see print(String s)
     */
    public static void print(short s) { print(new Short(s).toString());}
    
    /**
     * Prints an double to the screen or file without newLine.
     * @param d the data to be printed
     * @see print(String s)
     */
    public static void print(double d) { print(new Double(d).toString());}
    
    /**
     * Prints an float to the screen or file without newLine.
     * @param f the data to be printed
     * @see print(String s)
     */
    public static void print(float f) { print(new Float(f).toString());}
    
    /**
     * Prints an char to the screen or file without newLine.
     * @param c the data to be printed
     * @see print(String s)
     */
    public static void print( char c)  { print(new String(""+ c));}
    
    /**
     * Prints an boolean to the screen or file without newLine.
     * @param b the data to be printed
     * @see print(String s)
     */
    public static void print(boolean b) { print(new Boolean(b).toString());}
    

    //==========================================================================
    /**
     * Reads input from the keyboard or file and returns it as a char
     * @return The user input value
     */
    //==========================================================================
    public static char readChar() 
    {
        char returnValue = ' ';
        createInput();//Sets up Scanner object

        try 
        {  
            String userInput = new String(input.nextLine());
            returnValue = userInput.charAt(0); //return just the first character 
        }//end try
        catch(Exception e) 
        {
          System.out.println("Exception while reading user's input as a char");	
        }//end catch

    return returnValue;
    } // end readChar()=========================================================

    //==========================================================================
    /**
     * Reads input from the keyboard or file and returns it as a String
     * @return The user input value
     */
    //==========================================================================
    public static String readString() 
    {
        createInput();//Sets up Scanner object
        String userInput = null;

        try 
        {
            userInput = new String(input.nextLine());          
        }//end try
        catch(Exception e) 
        {
            System.out.println("Exception while reading user's input as a " +
                              "String");	
        }//end catch

    return userInput;
    } // end readString()=======================================================


    //==========================================================================
    /**
     * Reads input from the keyboard or file and returns it as a short
     * @return The user input value
     */
    //==========================================================================
    public static short readShort() 
    {
        short returnValue = 0;
        createInput();//Sets up Scanner object
        try 
        {   
          String userInput = new String(input.nextLine());
          returnValue = (java.lang.Short.valueOf(userInput)).shortValue();
        }//end try
        catch(Exception e) 
        {
          System.out.println("Exception while reading user's input as a short");	
        }//end catch

    return returnValue;
    } // end readShort()========================================================

    //==========================================================================
    /**
     * Reads input from the keyboard or file and returns it as an int
     * @return The user input value
     */
    //==========================================================================
    public static int readInt() 
    {
        int returnValue = 0;
        createInput();//Sets up Scanner object
        try 
        {
          String userInput = new String(input.nextLine());
          returnValue = new Integer(userInput).intValue();          
        }//end try
        catch(Exception e) 
        {
           System.out.println("Exception while reading user's input as an int");
           e.printStackTrace();
        }//end catch

    return returnValue;
    } // end readInt()==========================================================

    //==========================================================================
    /**
     *  Reads input from the keyboard or file and returns it as a float
     * @return The user input value
     */
    //==========================================================================
    public static float readFloat() 
    {
        float returnValue = 0;
        createInput();//Sets up Scanner object
        try 
        {
            String userInput = new String(input.nextLine());
            returnValue = (java.lang.Float.valueOf(userInput)).floatValue();          
        }//end try
        catch(Exception e) {
           System.out.println("Exception while reading user's input as a " +
                              "float");	
           e.printStackTrace();
        }//end catch

    return returnValue;
    } // end readFloat()========================================================


    //==========================================================================
    /**
     * Reads input from the keyboard or file and returns it as a double
     * @return The user input value
     */
    //==========================================================================
    public static double readDouble() 
    {
        double returnValue = 0;
        createInput();//Sets up Scanner object
        try 
        {
            String userInput = new String(input.nextLine());
            returnValue = (java.lang.Double.valueOf(userInput)).doubleValue();            
        }//end try
        catch(Exception e) 
        {
           System.out.println("Exception while reading user's input as a " +
                              "double");	
        }//end catch

    return returnValue;
    } // end readDouble()=======================================================


    
    //==========================================================================
    /**
    * Reads input from the keyboard or file and returns it as a long
    * @return The user input value
    */
    //==========================================================================
    public static long readLong() 
    {
        long returnValue = 0;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜精品久久久久久不卡8050| 一区二区激情小说| 欧洲一区二区av| 国产中文一区二区三区| 亚洲伊人伊色伊影伊综合网| 久久久99精品免费观看不卡| 欧美裸体bbwbbwbbw| www.色综合.com| 国产一区二区在线视频| 亚洲第一福利视频在线| 中文字幕免费不卡在线| 欧美成人午夜电影| 欧美日韩一区二区在线观看| av午夜精品一区二区三区| 韩国av一区二区三区四区| 亚洲18色成人| 一区二区在线观看免费视频播放| 久久综合av免费| 日韩免费高清电影| 欧美酷刑日本凌虐凌虐| 在线观看精品一区| 成人国产精品视频| 福利电影一区二区三区| 国产真实精品久久二三区| 日日噜噜夜夜狠狠视频欧美人 | 国产一区视频网站| 奇米一区二区三区av| 亚洲国产综合在线| 亚洲精品乱码久久久久久久久| 欧美韩日一区二区三区四区| 久久精品一区二区| 久久一区二区视频| 精品粉嫩超白一线天av| 日韩欧美国产三级电影视频| 日韩三级在线观看| 欧美乱妇15p| 欧美一区二区观看视频| 欧美一区二区三区免费视频| 日韩亚洲欧美成人一区| 日韩免费电影网站| wwwwww.欧美系列| 国产亚洲女人久久久久毛片| 国产午夜精品一区二区| 国产精品免费久久| 亚洲欧美视频在线观看| 亚洲一区二三区| 五月天欧美精品| 美女免费视频一区二区| 国内精品视频一区二区三区八戒| 国产剧情av麻豆香蕉精品| 国产精品自在在线| www.欧美.com| 欧美专区日韩专区| 91精品国产综合久久久久 | 亚洲色图一区二区三区| 亚洲精品欧美在线| 天堂成人国产精品一区| 精品一区二区三区蜜桃| 国产成人精品亚洲777人妖| 99精品久久久久久| 欧美日韩一区久久| 欧美α欧美αv大片| 国产欧美精品国产国产专区| 亚洲日本一区二区三区| 午夜精品一区二区三区电影天堂| 日韩av成人高清| 国产a区久久久| 在线观看国产日韩| 亚洲精品一区二区三区福利| 国产精品女同互慰在线看| 一个色综合av| 久久99国产精品成人| 成人黄色大片在线观看| 欧美日本高清视频在线观看| 亚洲精品在线网站| 亚洲精品亚洲人成人网 | 国产精品综合在线视频| 白白色亚洲国产精品| 欧美天堂一区二区三区| 久久美女艺术照精彩视频福利播放| 亚洲欧洲日产国产综合网| 日韩一区欧美二区| www.亚洲精品| 欧美成人猛片aaaaaaa| 18涩涩午夜精品.www| 奇米精品一区二区三区四区| 成人av动漫在线| 欧美一级高清片在线观看| 中文字幕一区二区在线观看| 麻豆精品视频在线观看| 91理论电影在线观看| 日韩欧美亚洲国产另类| 亚洲欧美日韩在线| 国产乱一区二区| 欧美福利视频导航| 中文字幕亚洲欧美在线不卡| 激情六月婷婷综合| 欧美色国产精品| 日韩一区在线播放| 国产一区二区不卡| 6080国产精品一区二区| 中文字幕字幕中文在线中不卡视频| 老司机午夜精品| 欧美婷婷六月丁香综合色| 国产精品丝袜黑色高跟| 看电视剧不卡顿的网站| 欧美色视频在线观看| 亚洲婷婷国产精品电影人久久| 精品一区中文字幕| 欧美一区二区视频观看视频| 亚洲综合色在线| 不卡的电影网站| 国产日产欧产精品推荐色| 美女爽到高潮91| 欧美日韩精品久久久| 一区二区三区四区五区视频在线观看 | 欧美美女黄视频| 一区二区三区精品在线观看| 成人动漫一区二区三区| 国产亚洲午夜高清国产拍精品| 美腿丝袜亚洲一区| 欧美日韩电影一区| 亚洲国产日韩a在线播放| 色综合天天天天做夜夜夜夜做| 亚洲成av人片在线观看无码| 91在线观看地址| 国产精品理伦片| 不卡av电影在线播放| 国产女同互慰高潮91漫画| 国产麻豆精品在线| 久久久综合激的五月天| 国产精品资源站在线| 久久综合999| 国产盗摄一区二区三区| 国产亚洲一区二区三区在线观看 | 日本一区二区三区在线观看| 国产精品1区二区.| 中文字幕av免费专区久久| 国产91精品欧美| 中文字幕一区二区视频| 91网站在线观看视频| 亚洲女厕所小便bbb| 在线观看视频一区| 婷婷成人激情在线网| 欧美高清精品3d| 精品一区二区综合| 久久久精品免费观看| 成人免费视频app| 亚洲色图视频网| 欧美色涩在线第一页| 日本欧美一区二区三区乱码| 日韩午夜激情av| 国产电影精品久久禁18| 中文字幕亚洲精品在线观看| 日本电影欧美片| 水野朝阳av一区二区三区| 欧美电影免费观看完整版| 国产美女精品人人做人人爽| 中文av一区二区| 在线观看av不卡| 免费在线观看一区二区三区| xnxx国产精品| 97超碰欧美中文字幕| 无码av免费一区二区三区试看 | 99国产一区二区三精品乱码| 亚洲综合在线观看视频| 欧美一区午夜精品| 国产成人在线观看| 亚洲精品免费在线| 日韩一卡二卡三卡四卡| 夫妻av一区二区| 亚洲成人av电影| 久久免费精品国产久精品久久久久| 99r精品视频| 热久久国产精品| 一区精品在线播放| 7777女厕盗摄久久久| 成人综合婷婷国产精品久久蜜臀 | 豆国产96在线|亚洲| 一区二区久久久| 久久久不卡影院| 精品视频一区三区九区| 国产露脸91国语对白| 亚洲不卡一区二区三区| 欧美激情在线看| 欧美日韩午夜在线| 粉嫩13p一区二区三区| 视频在线在亚洲| 国产精品久久夜| 91麻豆精品国产91久久久久久久久 | 亚洲va欧美va人人爽| 久久精品欧美日韩| 欧美美女喷水视频| jizz一区二区| 久久国产精品第一页| 亚洲精品ww久久久久久p站| 日韩精品中文字幕一区二区三区| 91在线精品秘密一区二区| 麻豆91精品91久久久的内涵| 一区二区久久久久|