在线现看午夜福利片|女人16久久免费视频|鲁丝片一区鲁丝片二区鲁丝|一区二区三区欧美在线

  1. 
    
    <b id="glvx9"></b>
        1. <blockquote id="glvx9"><meter id="glvx9"></meter></blockquote>
            首頁 考試吧論壇 Exam8視線 考試商城 網(wǎng)絡(luò)課程 模擬考試 考友錄 實用文檔 求職招聘 論文下載
            2011中考 | 2011高考 | 2012考研 | 考研培訓 | 在職研 | 自學考試 | 成人高考 | 法律碩士 | MBA考試
            MPA考試 | 中科院
            四六級 | 職稱英語 | 商務(wù)英語 | 公共英語 | 托福 | 雅思 | 專四專八 | 口譯筆譯 | 博思 | GRE GMAT
            新概念英語 | 成人英語三級 | 申碩英語 | 攻碩英語 | 職稱日語 | 日語學習 | 法語 | 德語 | 韓語
            計算機等級考試 | 軟件水平考試 | 職稱計算機 | 微軟認證 | 思科認證 | Oracle認證 | Linux認證
            華為認證 | Java認證
            公務(wù)員 | 報關(guān)員 | 銀行從業(yè)資格 | 證券從業(yè)資格 | 期貨從業(yè)資格 | 司法考試 | 法律顧問 | 導游資格
            報檢員 | 教師資格 | 社會工作者 | 外銷員 | 國際商務(wù)師 | 跟單員 | 單證員 | 物流師 | 價格鑒證師
            人力資源 | 管理咨詢師考試 | 秘書資格 | 心理咨詢師考試 | 出版專業(yè)資格 | 廣告師職業(yè)水平
            駕駛員 | 網(wǎng)絡(luò)編輯
            衛(wèi)生資格 | 執(zhí)業(yè)醫(yī)師 | 執(zhí)業(yè)藥師 | 執(zhí)業(yè)護士
            會計從業(yè)資格考試會計證) | 經(jīng)濟師 | 會計職稱 | 注冊會計師 | 審計師 | 注冊稅務(wù)師
            注冊資產(chǎn)評估師 | 高級會計師 | ACCA | 統(tǒng)計師 | 精算師 | 理財規(guī)劃師 | 國際內(nèi)審師
            一級建造師 | 二級建造師 | 造價工程師 | 造價員 | 咨詢工程師 | 監(jiān)理工程師 | 安全工程師
            質(zhì)量工程師 | 物業(yè)管理師 | 招標師 | 結(jié)構(gòu)工程師 | 建筑師 | 房地產(chǎn)估價師 | 土地估價師 | 巖土師
            設(shè)備監(jiān)理師 | 房地產(chǎn)經(jīng)紀人 | 投資項目管理師 | 土地登記代理人 | 環(huán)境影響評價師 | 環(huán)保工程師
            城市規(guī)劃師 | 公路監(jiān)理師 | 公路造價師 | 安全評價師 | 電氣工程師 | 注冊測繪師 | 注冊計量師
            繽紛校園 | 實用文檔 | 英語學習 | 作文大全 | 求職招聘 | 論文下載 | 訪談 | 游戲
            您現(xiàn)在的位置: 考試吧(Exam8.com) > 計算機等級考試 > 計算機二級 > JAVA > 復習資料 > 正文

            2011年計算機等級考試二級Java經(jīng)典算法大全(18)

            來源:考試吧Exam8.com) 2010-10-30 15:48:46 考試吧:中國教育培訓第一門戶 模擬考場
            本文為“計算機等級考試二級Java經(jīng)典算法大全”,以供廣大學員參考使用。更多關(guān)于計算機等級考試資料,請訪問考試吧計算機等級考試頻道(djks.exam8.com)。

              */

              public static int getRandomInt( int min, int max )

              {

              // include min, exclude max

              int result = min + new Double( Math.random() * ( max - min ) ).intValue();

              return result;

              }

              /**

              * get a random double with the range [min, max)

              * @param min the minimum value

              * @param max the maximum value

              * @return the random double value

              */

              public static double getRandomDouble( double min, double max )

              {

              // include min, exclude max

              double result = min + ( Math.random() * ( max - min ) );

              return result;

              }

              /**

              *

              * @return a random char with the range ASCII 33(!) to ASCII 126(~)

              */

              public static char getRandomChar()

              {

              // from ASCII code 33 to ASCII code 126

              int firstChar = 33; // "!"

              int lastChar = 126; // "~"

              char result = ( char ) ( getRandomInt( firstChar, lastChar + 1 ) );

              return result;

              }

              /**

              *

              * @return a random rgb color

              */

              public static RGB getRandomRGB()

              {

              int red = getRandomInt(0,256);

              int green = getRandomInt(0,256);

              int blue = getRandomInt(0,256);

              return new RGB( red, green, blue );

              }

              /**

              *

              * @return a random char with the range [0-9],[a-z],[A-Z]

              */

              public static char getRandomNormalChar()

              {

              // include 0-9,a-z,A-Z

              int number = getRandomInt( 0, 62 );

              int zeroChar = 48;

              int nineChar = 57;

              int aChar = 97;

              int zChar = 122;

              int AChar = 65;

              int ZChar = 90;

              char result;

              if( number < 10 )

              {

              result = ( char ) ( getRandomInt( zeroChar, nineChar + 1 ) );

              return result;

              }

              else if( number >= 10 && number < 36 )

              {

              result = ( char ) ( getRandomInt( AChar, ZChar + 1 ) );

              return result;

              }

              else if( number >= 36 && number < 62 )

              {

              result = ( char ) ( getRandomInt( aChar, zChar + 1 ) );

              return result;

              }

              else

              {

              return 0;

              }

              }

              /**

              *

              * @param length the length of the String

              * @return a String filled with random char

              */

              public static String getRandomString( int length )

              {

              // include ASCII code from 33 to 126

              StringBuffer result = new StringBuffer();

              for( int i = 0; i < length; i++ )

              {

              result.append( getRandomChar() );

              }

              return result.toString();

              }

              /**

              *

              * @param length the length of the String

              * @return a String filled with normal random char

              */

              public static String getRandomNormalString( int length )

              {

              // include 0-9,a-z,A-Z

              StringBuffer result = new StringBuffer();

              for( int i = 0; i < length; i++)

              {

              result.append( getRandomNormalChar() );

              }

              return result.toString();

              }

              }

              相關(guān)推薦:計算機等級考試二級Java編程的三十個基本規(guī)則

                   計算機等級考試二級Java練習題及答案匯總

            文章搜索
            版權(quán)聲明:如果計算機等級考試網(wǎng)所轉(zhuǎn)載內(nèi)容不慎侵犯了您的權(quán)益,請與我們聯(lián)系800@exam8.com,我們將會及時處理。如轉(zhuǎn)載本計算機等級考試網(wǎng)內(nèi)容,請注明出處。