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

JAVAÅÅÐò»ã×Ü


package com.softeem.jbs.lesson4;
import java.util.Random;
/**
* ÅÅÐò²âÊÔÀà
*
* ÅÅÐòËã·¨µÄ·ÖÀàÈçÏ£º
* 1.²åÈëÅÅÐò£¨Ö±½Ó²åÈëÅÅÐò¡¢ÕÛ°ë²åÈëÅÅÐò¡¢Ï£¶ûÅÅÐò£©£»
* 2.½»»»ÅÅÐò£¨Ã°ÅÝÅÝÅÅÐò¡¢¿ìËÙÅÅÐò£©£»
* 3.Ñ¡ÔñÅÅÐò£¨Ö±½ÓÑ¡ÔñÅÅÐò¡¢¶ÑÅÅÐò£©£»
* 4.¹é²¢ÅÅÐò£»
* 5.»ùÊýÅÅÐò¡£
*
* ¹ØÓÚÅÅÐò·½·¨µÄÑ¡Ôñ£º
* (1)Èôn½ÏС(Èçn≤50)£¬¿É²ÉÓÃÖ±½Ó²åÈë»òÖ±½ÓÑ¡ÔñÅÅÐò¡£
* ¡¡µ±¼Ç¼¹æÄ£½ÏСʱ£¬Ö±½Ó²åÈëÅÅÐò½ÏºÃ£»·ñÔòÒòΪֱ½ÓÑ¡ÔñÒƶ¯µÄ¼Ç¼ÊýÉÙÓÚÖ±½Ó²åÈË£¬Ó¦Ñ¡Ö±½ÓÑ¡ÔñÅÅÐòΪÒË¡£
* (2)ÈôÎļþ³õʼ״̬»ù±¾ÓÐÐò(Ö¸ÕýÐò)£¬ÔòӦѡÓÃÖ±½Ó²åÈË¡¢Ã°ÅÝ»òËæ»úµÄ¿ìËÙÅÅÐòΪÒË£»
* (3)Èôn½Ï´ó£¬ÔòÓ¦²ÉÓÃʱ¼ä¸´ÔÓ¶ÈΪO(nlgn)µÄÅÅÐò·½·¨£º¿ìËÙÅÅÐò¡¢¶ÑÅÅÐò»ò¹é²¢ÅÅÐò¡£
*
*/
public class SortTest {
/**
* ³õʼ»¯²âÊÔÊý×éµÄ·½·¨
* @return Ò»¸ö³õʼ»¯ºÃµÄÊý×é
*/
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;
}
/**
* ´òÓ¡Êý×éÖеÄÔªËص½¿ØÖÆ̨
* @param source
*/
public void printArray(int[] data) {
for (int i : data) {
System.out.print(i + " ");
}
System.out.println();
}
/**
* ½»»»Êý×éÖÐÖ¸¶¨µÄÁ½ÔªËصÄλÖÃ
* @param data
* @param x
* @param y
*/
private void swap(int[] data, int x, int y) {
int temp = data[x];
data[x] = data[y];
data[y] = temp;
}
/**
* ðÅÝÅÅÐò----½»»»ÅÅÐòµÄÒ»ÖÖ
* ·½·¨£ºÏàÁÚÁ½ÔªËؽøÐбȽϣ¬ÈçÓÐÐèÒªÔò½øÐн»»»£¬Ã¿Íê³ÉÒ»´ÎÑ­»·¾Í½«×î´óÔªËØÅÅÔÚ×îºó£¨Èç´ÓСµ½´óÅÅÐò£©£¬ÏÂÒ»´ÎÑ


Ïà¹ØÎĵµ£º

javaÖлñµÃÊý×éÖÐ×îСµÄÊý

public static void main(String[] args)
{
Integer[] arrInt = new Integer[6];
arrInt[0] = 123;
arrInt[1] = 3453;
arrInt[2] = 345;
arrInt[3] = 23;
arrInt[4] = 11;
arrInt[5] = 345;

int temp = 0;
for (int i ......

javaµÝ¹éʵÏÖµÄÃÔ¹¬ÓÎÏ·

public class Migong {
 
    private int gard[][]={  {1,1,1,1,0,1,1,1},
                         {0,0,0,1,1,1,1,1},
       ......

Java»ù±¾Êý¾ÝÀàÐ͵ÄÔËËã

¡¾Ö÷Ìâ¡¿  Java»ù±¾Êý¾ÝÀàÐ͵ÄÔËËã
¡¾¹Ø¼ü×Ö¡¿java »ù±¾Êý¾ÝÀàÐÍ
¡¾ÎÊÌâÃèÊö¡¿Çë¿´Èç¹ûÒ»¶Î´úÂë,Èç¹û²»ÔÚeclipseÀïÔËÐÐ,Çëд³öÊä³ö½á¹û
                  public static void main(String[] args) {
   &n ......

java ´®¿ÚͨÐÅ ¶þ

Java´®¿ÚͨѶ
 
   
´®ÐÐͨѶЭÒéÓкܶàÖÖ£¬ÏñRS232£¬RS485£¬RS422£¬ÉõÖÁÏÖ½ñÁ÷ÐеÄUSBµÈ¶¼ÊÇ´®ÐÐͨѶЭÒé¡£¶ø´®ÐÐͨѶ¼¼ÊõµÄÓ¦ÓÃÎÞ´¦²»ÔÚ¡£¿ÉÄÜ´ó¼Ò¼ûµÄ×î¶à¾ÍÊǵçÄԵĴ®¿ÚÓëModemµÄͨѶ¡£¼ÇµÃÔÚPC»ú¸Õ¿ªÊ¼ÔÚÖйúÁ÷ÐÐÆðÀ´Ê±(´óÔ¼ÊÇÔÚ90Äê´úÇ°ÎåÄê)£¬ÄÇʱÉõÖÁÓÐÈËÓÃÒ»Ìõ´®ÐÐÏß½øÐÐÁ½Ì¨µçÄÔÖ®¼äµÄÊý ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ