<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆-144  評論-80  文章-1  trackbacks-0

    package com.faintbear;
    import java.io.*;


    class Input{
         //Read a Sring from kedboard
            public static String getString()
            {
                String string="";
                BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
                try
                {
                    string=br.readLine();
                }
                catch(IOException iox)
                {
                    System.err.println(iox);
                }
            return string;
            }
           
            // read a char from keyboard
            public static char getChar()throws java.io.IOException
            {
                    char cookie;

                    while(true){
                            String string=getString();//Reads the next line of text from the input stream

                            //Check the input
                            if (string.length()>1)
                            {
                                System.err.println("Sorry,You should input a character,");
                                System.err.println("Please input again");
                                continue;
                            }
                            else {
                                    cookie=string.charAt(0) ;
                                    return cookie;
                            }
                    }
            }
           
           
            //read a double number from keyboard
            public static double getDouble( ) 
            {
                double cookie;

                while(true)
                {
                        String string = getString();
                        try
                        {
                            cookie=Double.parseDouble(string);
                            return cookie;
                        }
                        //Check the number
                        catch(NumberFormatException nfe)
                        {
                            System.err.println("Sorry,this is not a double number,plz input again");
                            continue;
                        }
                }
               
            }
           
            //Read a int number from keyboard
            public static int getInt( ) 
            {
                int cookie;
                while(true)
                {
                    String string = getString();
                    try
                    {
                        cookie=Integer.parseInt(string);
                        return cookie;
                    }
                    //Check the input number
                    catch(NumberFormatException nfe)
                    {
                        System.err.println("Sorry,this is not a integer number,plz input again");
                        continue;
                    }
                }
            }
           
            //Read a float number from keyboard
            public static float getFloat()
            {
                float cookie;
                while(true)
                {
                    String string = getString();
                    try
                    {
                        cookie=Float.parseFloat(string);
                        return cookie;
                    }
                    //Check the input number
                    catch(NumberFormatException nfe)
                    {
                        System.err.println("Sorry,this is not a float number,plz input again");
                        continue;
                    }
                }
               
            }

    }

     

     

    package com.faintbear;
    import com.faintbear.Input;
    public class Class1
    {
     public static void main(String[] args)
     {
      System.out.println("請輸入數據");
      System.out.println("******************");
      int kk=Input.getInt();
      System.out.println("l1====="+kk);
     }
    }

    posted on 2005-03-30 23:35 小力力力 閱讀(320) 評論(0)  編輯  收藏 所屬分類: JAVA
    主站蜘蛛池模板: 18禁免费无码无遮挡不卡网站| 最近的中文字幕大全免费8| 污污免费在线观看| 天堂在线免费观看| 久久综合AV免费观看| 亚洲午夜无码片在线观看影院猛| 亚洲麻豆精品果冻传媒| 国产区图片区小说区亚洲区| 免费视频一区二区| 亚洲国产成人久久精品99| 亚洲第一香蕉视频| 丝袜捆绑调教视频免费区| 国产精品国产免费无码专区不卡| 亚洲av无码一区二区三区网站| 337P日本欧洲亚洲大胆艺术图 | jizz免费在线观看| 免费高清在线爱做视频| 久久夜色精品国产亚洲| 免费无码专区毛片高潮喷水| 亚洲国产成人乱码精品女人久久久不卡 | 亚洲免费人成在线视频观看| 亚洲色精品三区二区一区| 在线免费观看亚洲| 国产精品亚洲片在线va| 18女人腿打开无遮掩免费| 国产午夜亚洲精品午夜鲁丝片| 在线观看亚洲免费| 久久精品夜色噜噜亚洲A∨| 精品在线观看免费| 久久久亚洲精品蜜桃臀| 久久伊人免费视频| 久久精品国产亚洲av四虎| 国产精品免费精品自在线观看| 亚洲va中文字幕| 国产日产成人免费视频在线观看| 免费一级全黄少妇性色生活片 | 久久精品国产亚洲AV无码偷窥| 国内精品久久久久影院免费| 亚洲免费视频网址| 国产精品怡红院永久免费| 国产亚洲成在线播放va|