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

JAVAÅÅÐò»ã×Ü

package sort;

import java.util.Random;

/**
* ÅÅÐò²âÊÔÀà
*
* ÅÅÐòËã·¨µÄ·ÖÀàÈçÏ£º 1.²åÈëÅÅÐò£¨Ö±½Ó²åÈëÅÅÐò¡¢ÕÛ°ë²åÈëÅÅÐò¡¢Ï£¶ûÅÅÐò£©£» 2.½»»»ÅÅÐò£¨Ã°ÅÝÅÝÅÅÐò¡¢¿ìËÙÅÅÐò£©£»
* 3.Ñ¡ÔñÅÅÐò£¨Ö±½ÓÑ¡ÔñÅÅÐò¡¢¶ÑÅÅÐò£©£» 4.¹é²¢ÅÅÐò£» 5.»ùÊýÅÅÐò¡£
*
* ¹ØÓÚÅÅÐò·½·¨µÄÑ¡Ôñ£º (1)Èôn½ÏС(Èçn≤50)£¬¿É²ÉÓÃÖ±½Ó²åÈë»òÖ±½ÓÑ¡ÔñÅÅÐò¡£
* µ±¼Ç¼¹æÄ£½ÏСʱ£¬Ö±½Ó²åÈëÅÅÐò½ÏºÃ£»·ñÔòÒòΪֱ½ÓÑ¡ÔñÒƶ¯µÄ¼Ç¼ÊýÉÙÓÚÖ±½Ó²åÈË£¬Ó¦Ñ¡Ö±½ÓÑ¡ÔñÅÅÐòΪÒË¡£
* (2)ÈôÎļþ³õʼ״̬»ù±¾ÓÐÐò(Ö¸ÕýÐò)£¬ÔòӦѡÓÃÖ±½Ó²åÈË¡¢Ã°ÅÝ»òËæ»úµÄ¿ìËÙÅÅÐòΪÒË£»
* (3)Èôn½Ï´ó£¬ÔòÓ¦²ÉÓÃʱ¼ä¸´ÔÓ¶ÈΪO(nlgn)µÄÅÅÐò·½·¨£º¿ìËÙÅÅÐò¡¢¶ÑÅÅÐò»ò¹é²¢ÅÅÐò¡£
*
*/
/**
* @JAVAÅÅÐò»ã×Ü
*/
public class SortTest {

// //////==============================²úÉúËæ»úÊý==============================///////////////////
/**
* @description Éú³ÉËæ»úÊý
* @date Nov 19, 2009
* @author HDS
* @return int[]
*/
public int[] createArray() {
Random random = new Random();
int[] array = new int[10];
for (int i = 0; i < 10; i++) {
array[i] = random.nextInt(100) - random.nextInt(100);// Éú³ÉÁ½¸öËæ»úÊýÏà¼õ£¬±£Ö¤Éú³ÉµÄÊýÖÐÓиºÊý
}
System.out.println("==========ԭʼÐòÁÐ==========");
printArray(array);
return array;
}

/**
* @description ´òÓ¡³öËæ»úÊý
* @date Nov 19, 2009
* @author HDS
* @param data
*/
public void printArray(int[] data) {
for (int i : data) {
System.out.print(i + " ");
}
System.out.println();
}

/**
* @description ½»»»ÏàÁÚÁ½¸öÊý
* @date Nov 19, 2009
* @author HDS
* @param data
* @param x
* @param y
*/
public void swap(int[] data, int x, int y) {
int temp = data[x];
data[x] = data[y];
data[y]


Ïà¹ØÎĵµ£º

Äêµ×ÊÕ²ØϵÁÐ Java Web¹¤¾ßCookieSupport

/*
* CookieSupport.java
* Copyright (C) 2007-3-19 <JustinLei@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version ......

javaÊý¾Ý¿âµÈ——ÂÒÂëÎÊÌâ½â¾ö°ì·¨

ÖÐÎÄÂÒÂë½â¾ö·½°¸£º
Êý¾Ý¿âÂÒÂë:
UTF-8¶ÔÖÐÎÄÓÃ3¸ö×Ö½ÚÀ´±íʾ
String s =”·ÉÏè”;
byte[] utf8 = s.getBytes(“utf-8”);//»ñµÃutf-8±àÂëµÄ×Ö½ÚÖµ
System….(new String(utf8,”gbk”);//ÓÃGBK±àÂë¸ñʽ¶ÔUTF-8±àÂë¸ñʽµÄ×Ö½ÚÊý×é½øÐнâÂ룬½«²úÉúÂÒÂë¡£
 
²é¿´Êý¾Ý¿âµÄ× ......

12.18 javaÖеÄview£¬ibatis dao

JavaÄÚ²¿À൱³õµÄÉè¼ÆÄ¿µÄÓ¦¸ÃÊÇʵÏÖ¶àÖؼ̳У¬ºóÀ´·¢ÏÖÄÚ²¿À໹´øÀ´ÁËÆäËûºÃ´¦£¬Èç¿ÉÒÔʹÓÃÄÚ²¿Àà°üװһЩº¯Êý£¬ÊµÏÖº¯Êý¼¶±ðµÄȨÏÞ¿ØÖƵȡ£
     JavaÖУ¬LIst.subList()µÈ·½·¨²úÉúµÄÊÇÒ»¸öview£¬¼´²»ÊÇ´«Öµ£¬¶ø½öÊÇÒýÓá£ËƺõÔÚjavaÖгýÁËprimitiveÀ࣬ÆäËûÀ඼Ðènew²ÅÄܲúÉúжÔÏó¡£
iBatis DAO¿ò¼ÜÍ ......

java Ê®´óÒì³£

java.lang.NullPointerException
Õâ¸öÒì³£´ó¼Ò¿Ï¶¨¶¼¾­³£Óöµ½£¬Òì³£µÄ½âÊÍÊÇ "³ÌÐòÓöÉÏÁË¿ÕÖ¸Õë "£¬¼òµ¥µØ˵¾ÍÊǵ÷ÓÃÁËδ¾­³õʼ»¯µÄ¶ÔÏó»òÕßÊDz»´æÔڵĶÔÏó£¬Õâ¸ö´íÎó¾­³£³öÏÖÔÚ´´½¨Í¼Æ¬£¬µ÷ÓÃÊý×éÕâЩ²Ù×÷ÖУ¬±ÈÈçͼƬδ¾­³õʼ»¯£¬»òÕßͼƬ´´½¨Ê±µÄ·¾¶´íÎóµÈµÈ¡£¶ÔÊý×é²Ù×÷ÖгöÏÖ¿ÕÖ¸Õ룬ºÜ¶àÇé¿öÏÂÊÇһЩ¸Õ¿ªÊ¼Ñ§Ï°±à³Ì ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ