<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
    主站蜘蛛池模板: 国产亚洲无线码一区二区| 特级淫片国产免费高清视频| 国产亚洲精品成人a v小说| 国产精品亚洲专区一区| 又粗又黄又猛又爽大片免费| 久久亚洲欧美国产精品| 国产无遮挡吃胸膜奶免费看| 精品亚洲成a人在线观看| 免费大片在线观看网站| 一区二区三区精品高清视频免费在线播放| 免费国产小视频在线观看| 免费VA在线观看无码| 亚洲自偷自偷在线制服 | 国产在线观看片a免费观看| 亚洲一区中文字幕| 成人男女网18免费视频| 国产精品亚洲天堂| 亚洲日韩中文在线精品第一| 国产在线国偷精品免费看| 亚洲va国产va天堂va久久| 中文字幕无码免费久久99| 久久精品国产亚洲av天美18| 亚洲精品高清一二区久久| 国产精品偷伦视频观看免费| 亚洲精品影院久久久久久| 在线天堂免费观看.WWW| 美女扒开尿口给男人爽免费视频 | 日韩亚洲国产高清免费视频| 亚洲成AV人片高潮喷水| 亚洲精品视频在线看| 无码av免费一区二区三区| 亚洲国产综合在线| 免费国产高清视频| 无码国产精品一区二区免费模式| 激情综合亚洲色婷婷五月| 哒哒哒免费视频观看在线www| 日本在线免费观看| 亚洲av无码专区亚洲av不卡| 亚洲日韩av无码| 国产一精品一AV一免费孕妇| 国产精品免费αv视频|