锘??xml version="1.0" encoding="utf-8" standalone="yes"?>欧美激情aaaa,国产精品99免视看9,国产精品视频线看http://www.aygfsteel.com/johnny-sang/zh-cnThu, 19 Jun 2025 15:46:20 GMTThu, 19 Jun 2025 15:46:20 GMT60java鑼冨瀷浠嬬粛 錛堣漿杞斤級(jí)http://www.aygfsteel.com/johnny-sang/archive/2007/08/30/141473.html蹇?jī)鏈堢?/dc:creator>蹇?jī)鏈堢?/author>Thu, 30 Aug 2007 09:55:00 GMThttp://www.aygfsteel.com/johnny-sang/archive/2007/08/30/141473.htmlhttp://www.aygfsteel.com/johnny-sang/comments/141473.htmlhttp://www.aygfsteel.com/johnny-sang/archive/2007/08/30/141473.html#Feedback0http://www.aygfsteel.com/johnny-sang/comments/commentRss/141473.htmlhttp://www.aygfsteel.com/johnny-sang/services/trackbacks/141473.htmljava鑼冨瀷綆浠?/font>

涓.綆鍗曡璇唈ava鑼冨瀷       

           緇忓父鍚漢璇?#8220;鑼冨瀷”錛屾垜涓鐩翠笉鏄お鏄庣櫧浠涔堝彨“鑼冨瀷”錛屼粖澶╁氨鏌ラ槄浜?jiǎn)涓浜涙枃绔狅紝緇欐垜鐨勭涓鎰熻灝辨槸涔嬫墍浠ュ湪java涓敤鑼冨瀷錛屽氨鏄負(fù)浜?jiǎn)璁╀竴浜涢敊璇湪緙栬瘧闃舵灝卞彲浠ユ毚闇插嚭鏉ワ紝鑰屼笉鐢ㄥ湪榪愯闃舵鎵嶆姏鍑哄紓甯搞備笅闈㈢粰鍑轟竴涓畝鍗曚緥瀛愭潵璇存槑銆?/p>

    /** *//**
      * 娌℃湁鍒╃敤鑼冨瀷鐨勪緥瀛?br>     
*/

    
public void example1()...{
         ArrayList array
=new ArrayList();
         array.add(
"this is a string");
         array.add(
new Integer(3));//榪欓噷鍙互姝g‘娣誨姞
        
         Iterator iterator
=array.iterator();
        
while(iterator.hasNext())...{
             String str
=(String)iterator.next();//緙栬瘧鏃舵病閿欙紝浣嗗湪榪愯鏃朵細(xì)鎶涘嚭ClassCastException寮傚父
             System.out.println(str);
         }
    
     }
榪愯浠ヤ笂紼嬪簭錛屼細(xì)鎶涘嚭 java.lang.ClassCastException寮傚父錛岃岃寮傚父鏄湪紼嬪簭榪愯榪囩▼涓墠浼?xì)鍙戠幇鐨勫Q屽鏋滄垜浠埄鐢ㄤ簡(jiǎn)鑼冨瀷錛屽垯鍦ㄧ紪璇戦樁孌靛氨浼?xì)鍙戠幇寮傚父锛屼粠鑰屼繚璇佺被鍨嬭漿鎹㈠畨鍏ㄣ傚涓嬮潰紼嬪簭錛?
    public void example2()...{
         ArrayList
<String> array=new ArrayList<String>();
         array.add(
"this is a string");
        
//array.add(new Integer(3));//緙栬瘧鏃朵細(xì)鎶ュ紓甯革細(xì)The method add(String) in the type ArrayList<String> is not applicable for the arguments(Integer)
        
         Iterator
<String> iterator=array.iterator();
        
while(iterator.hasNext())...{
             String str
=iterator.next();//榪欓噷灝變笉闇瑕佽繘琛屽己鍒剁被鍨嬭漿鎹?/span>
             System.out.println(str);
         }
    
     }

榪欐牱錛屾垜浠湪緙栬瘧闃舵灝卞彲浠ユ崟鑾峰彲鑳藉瓨鍦ㄥ湴鍗遍櫓銆?/p>

閫氳繃浠ヤ笂綆鍗曚緥瀛愶紝鎴戜滑鍙互鐪嬪嚭錛屼嬌鐢╦ava鑼冨瀷鐨勫ソ澶勬湁錛?/p>

  1. 鍐呭湪鐨勭被鍨嬭漿鎹紭浜庡湪澶栭儴鐨勪漢宸ヨ漿鎹?
  2. 綾誨瀷鐨勫尮閰嶉棶棰樺湪緙栬瘧闃舵灝卞彲浠ュ彂鐜幫紝鑰屼笉鐢ㄥ湪榪愯闃舵

浜?鍒涘緩鑷繁鐨勮寖鍨?/strong>

浠諱綍綾伙紝鎺ュ彛錛屽紓甯革紝鏂規(guī)硶閮藉彲浠ヤ嬌鐢ㄨ寖鍨嬶紝涓嬮潰鏄釜綆鍗曠殑渚嬪瓙錛屼嬌鐢ㄨ寖鍨嬫潵姣旇緝涓や釜瀵硅薄鐨勫ぇ灝忥紝涓や釜瀵硅薄蹇呴』閮藉疄鐜頒簡(jiǎn)Comparable鎺ュ彛銆?/font>

    public <T extends Comparable> T max(T t1, T t2) ...{
         
if(t1.compareTo(t2) <= 0) ...{
            
return t2;
         }
else ...{
            
return t1;
         }

     }


]]>
java鍏跺畠http://www.aygfsteel.com/johnny-sang/archive/2007/08/30/141470.html蹇?jī)鏈堢?/dc:creator>蹇?jī)鏈堢?/author>Thu, 30 Aug 2007 09:53:00 GMThttp://www.aygfsteel.com/johnny-sang/archive/2007/08/30/141470.htmlhttp://www.aygfsteel.com/johnny-sang/comments/141470.htmlhttp://www.aygfsteel.com/johnny-sang/archive/2007/08/30/141470.html#Feedback0http://www.aygfsteel.com/johnny-sang/comments/commentRss/141470.htmlhttp://www.aygfsteel.com/johnny-sang/services/trackbacks/141470.html1. 鎵搄ar鍖?br>    榛樿淇濆瓨鍒癈:\Documents and Settings\Administrator

   jar cvf 瑕佷繚瀛樼殑鍚嶅瓧   璺緞

   渚嬪   jar    cvf     upload.jar    D:\project\hospital\web\WEB-INF\lib\a\upload



]]>
綆鍗曠殑MD5鍔犲瘑http://www.aygfsteel.com/johnny-sang/archive/2007/08/30/141469.html蹇?jī)鏈堢?/dc:creator>蹇?jī)鏈堢?/author>Thu, 30 Aug 2007 09:51:00 GMThttp://www.aygfsteel.com/johnny-sang/archive/2007/08/30/141469.htmlhttp://www.aygfsteel.com/johnny-sang/comments/141469.htmlhttp://www.aygfsteel.com/johnny-sang/archive/2007/08/30/141469.html#Feedback0http://www.aygfsteel.com/johnny-sang/comments/commentRss/141469.htmlhttp://www.aygfsteel.com/johnny-sang/services/trackbacks/141469.htmlpackage com.MD5;
import java.security.*;

import java.security.spec.*;


public class MD5{

public static String getMD5(String s){

   char hexDigits[] = {'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'};
   try
   {
    byte[] strTemp = s.getBytes();
    MessageDigest mdTemp = MessageDigest.getInstance("MD5");
    mdTemp.update(strTemp);
    byte[] md = mdTemp.digest();
    int j = md.length;
    char str[] = new char[j*2];
    int k = 0;
    for (int i = 0; i < j; i++)
    {
     byte byte0 = md[i];
     str[k++] = hexDigits[byte0 >>> 4 & 0xf];
     str[k++] = hexDigits[byte0 & 0xf];
    }
    return new String(str);
   }
   catch (Exception e)
   {
    return null;
   }
}
public static void main(String[] args)
{
  

   System.out.print(MD5.getMD5("寮犱笁"));

}
}



]]>
鑾峰彇鏃墮棿http://www.aygfsteel.com/johnny-sang/archive/2007/08/30/141468.html蹇?jī)鏈堢?/dc:creator>蹇?jī)鏈堢?/author>Thu, 30 Aug 2007 09:49:00 GMThttp://www.aygfsteel.com/johnny-sang/archive/2007/08/30/141468.htmlhttp://www.aygfsteel.com/johnny-sang/comments/141468.htmlhttp://www.aygfsteel.com/johnny-sang/archive/2007/08/30/141468.html#Feedback0http://www.aygfsteel.com/johnny-sang/comments/commentRss/141468.htmlhttp://www.aygfsteel.com/johnny-sang/services/trackbacks/141468.htmlString t=String.valueOf(System.currentTimeMillis());//鑾峰緱鏃墮棿錛堢簿紜埌姣錛?/p>

棣栧厛System.currentTimeMillis()浜х敓涓涓綋鍓嶇殑姣錛岃繖涓縐掑叾瀹炲氨鏄嚜1970騫?鏈?鏃?鏃惰搗鐨勬縐掓暟錛孌ate()鍏跺疄灝辨槸鐩稿綋浜嶥ate(System.currentTimeMillis());鍥犱負(fù)Date綾昏繕鏈夋瀯閫燚ate(long date)錛岀敤鏉ヨ綆條ong縐掍笌1970騫?鏈?鏃ヤ箣闂寸殑姣宸?br>       寰楀埌浜?jiǎn)杩欎釜姣U掓暟錛屾垜浠嚜宸變篃鍙互綆楄搗鐜板湪鐨勫勾鏈堟棩鍛ㄦ椂錛屼絾鏄繖涓嶆槸鎴戜滑鍘昏綆楃殑錛屽洜涓烘湁Calendar銆侰alendar鏈緇堝嚭鐨勭粨鏋滃氨鏄勾鏈堟棩鍛ㄦ椂鏃跺尯銆?/p>

涔熷彲浠ョ敤榪欎釜鏉ュ仛涓婁紶鏂囦歡鐨勫悕縐幫紙閭e氨涓嶅彲鑳芥湁閲嶅鍊間簡(jiǎn)鍝︼級(jí)



]]>
主站蜘蛛池模板: 昭觉县| 石首市| 曲麻莱县| 顺昌县| 九江市| 通辽市| 兴业县| 井陉县| 定安县| 井研县| 宕昌县| 巴林左旗| 清远市| 沂水县| 安义县| 固阳县| 嘉荫县| 定襄县| 大兴区| 澄江县| 西畴县| 金湖县| 呼伦贝尔市| 呼和浩特市| 高台县| 防城港市| 文水县| 丽江市| 崇礼县| 灵山县| 裕民县| 霍林郭勒市| 宁南县| 温宿县| 阿巴嘎旗| 宁德市| 五河县| 尤溪县| 辰溪县| 纳雍县| 岑溪市|