Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

java¸÷ÖÖÅÅÐò·½·¨

package org.rut.util.algorithm.support;
 
import org.rut.util.algorithm.SortUtil;
/**
 * @author treeroot
 * @since 2006-2-2
 * @version 1.0
 */
public class InsertSort implements SortUtil.Sort{
 
    /* (non-Javadoc)
     * @see org.rut.util.algorithm.SortUtil.Sort#sort(int[])
     */
    public void sort(int[] data) {
        int temp;
        for(int i=1;i<data.length;i++){
            for(int j=i;(j>0)&#38;&#38;(data[j]<data[j-1]);j--){
                SortUtil.swap(data,j,j-1);
            }
        }       
    }
 
}
ðÅÝÅÅÐò:
package org.rut.util.algorithm.support;
 
import org.rut.util.algorithm.SortUtil;
 
/**
 * @author treeroot
 * @since 2006-2-2
 * @version 1.0
 */
public class BubbleSort implements SortUtil.Sort{
 
    /* (non-Javadoc)
     * @see org.rut.util.algorithm.SortUtil.Sort#sort(int[])
     */
    public void sort(int[] data) {
        int temp;
        for(int i=0;i<data.length;i++){
            for(int j=data.length-1;j>i;j--){
                if(data[j]<data[j-1]){
                    SortUtil.swap(data,j,j-1);
     &


Ïà¹ØÎĵµ£º

javaʵÏÖ¶ÁÈ¡XMLÎļþÊý¾Ý²åÈëµ½Êý¾Ý¿âÖÐ

package com.flxx.docUrl;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.List;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.input.SAXBuilder;
import org.jdom.output.Format;
import org.jd ......

java ½øÖÆת»»

public class Test { 
      public static void main(String args[]) {  
        System.out.println(Integer.toBinaryString(20));   //Ê®½øÖÆ-->2½øÖÆ  
        System ......

ÓÃjavaʵÏÖcache


ÔÚ¿ª·¢ÏîÄ¿¹¤³Ìʱ£¬¾­³£»áÓöµ½±£´æijЩֵ·Åµ½ÏµÍ³µÄcacheÖУ¬ÏÖÓÃCache.javaºÍCacheManager.javaÀ´¹ÜÀí¡£¾ßÌå´úÂë·Ö±ðÈçÏ£º
public class Cache {
       
private String key;
       
private Object value;
    &n ......

javaÖÐ×Ö·û´®×ª»»³Éʱ¼ä¸ñʽ×ܽá

javaÖÐ×Ö·û´®×ª»»³Éʱ¼ä¸ñʽ×ܽá
¹Ø¼ü×Ö: java ×Ö·û´® ʱ¼ä ¸ñʽ
ͨ¹ý³¤Ê±¼äµÄ¶Ôʱ¼ä²»Í¬¸ñʽµÄת»»£¬×Ô¼º¾õµÃÆäʵ¾ÍÊǶԺÁÃëÊýµÄ²Ù×÷
Java´úÂë
System.currentTimeMillis()  
System.currentTimeMillis()
µÃµ½´Ó1970Äê1ÔÂ1ÈÕµ½ÏÖÔڵĺÁÃëÊý£¬¾Í¿ÉÒÔת»»³É¸÷ÖÖµÄÐÎʽ¡£
ÓÐÕâÑùÒ»¸ö×Ö·û´®£º“ ......

Java»ù±¾Êý¾ÝÀàÐÍ

 ±äÁ¿,³£Á¿µÄ¸ÅÄî

  JavaÓïÑÔÖÐÓÐÎåÖÖ²»Í¬ÀàÐ͵ij£Á¿,

 
•1ÕûÐͳ£Á¿:ÈκÎÒ»¸öÕûÐÍÊý×Ö¾ÍÊÇÒ»¸öÕûÐͳ£Á¿.
–JavaÓïÑÔÖÐ,ÕûÐͳ£Á¿ÓÐÈýÖÖ±íʾ·½Ê½:
•Ê®½øÖÆ:0,1,2,3,4,5,6,7,8,9,10,11,12…¶¼ÊÇÊ®½øÖƵij£Á¿
•°Ë½øÖÆ:°Ë½øÖÆ¿ÍÁ÷Á¿Ö»ÄÜÓÃ0,1,2,3,4,5,6,7À ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ