<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("請輸入數(shù)據(jù)");
      System.out.println("******************");
      int kk=Input.getInt();
      System.out.println("l1====="+kk);
     }
    }

    posted on 2005-03-30 23:35 小力力力 閱讀(314) 評論(0)  編輯  收藏 所屬分類: JAVA
    主站蜘蛛池模板: 国产精品视频免费一区二区| 青青草原亚洲视频| 最近中文字幕mv手机免费高清| 免费A级毛片无码久久版| 国产精品V亚洲精品V日韩精品| tom影院亚洲国产一区二区| 亚洲风情亚Aⅴ在线发布| 免费无码一区二区三区蜜桃 | 亚洲酒色1314狠狠做| 免费看一级一级人妻片| 久久WWW免费人成一看片| 亚洲午夜福利717| 亚洲aⅴ无码专区在线观看春色| 无码日韩精品一区二区三区免费 | 天天天欲色欲色WWW免费| 久久精品九九亚洲精品| 成全视成人免费观看在线看| 日本最新免费不卡二区在线| 亚洲人成免费电影| 久久综合给合久久国产免费 | 久久青草免费91线频观看站街| 四虎影视在线永久免费看黄| 亚洲一卡二卡三卡| 免费看美女让人桶尿口| jlzzjlzz亚洲jzjzjz| 国产精品四虎在线观看免费| 波多野结衣亚洲一级| 免费人成网站7777视频| 免费人成在线观看视频高潮| 亚洲最大黄色网址| 中国xxxxx高清免费看视频| 亚洲AV区无码字幕中文色| 国产在线观看无码免费视频| 久久久无码精品亚洲日韩蜜臀浪潮 | 亚洲手机中文字幕| 色播在线永久免费视频| 丝袜捆绑调教视频免费区| 亚洲午夜精品国产电影在线观看| 免费永久在线观看黄网站| 久热免费在线视频| 国产精品亚洲综合一区在线观看|