Ï£¶ûÅÅÐòËã·¨µÄJAVAʵÏÖ
package Utils.Sort;
/**
*Ï£¶ûÅÅÐò£¬ÒªÇó´ýÅÅÐòµÄÊý×é±ØÐëʵÏÖComparable½Ó¿Ú
*/
public class ShellSort implements SortStrategy
{
private int[] increment;
/**
*ÀûÓÃÏ£¶ûÅÅÐòËã·¨¶ÔÊý×éobj½øÐÐÅÅÐò
*/
public void sort(Comparable[] obj)
{
if (obj == null)
{
throw new NullPointerException("The argument can not be null!");
}
//³õʼ»¯²½³¤
initGap(obj);
//²½³¤ÒÀ´Î±ä»¯£¨µÝ¼õ£©
for (int i = increment.length - 1 ;i >= 0 ;i-- )
{
int step = increment[i];
//Óɲ½³¤Î»ÖÿªÊ¼
for (int j = step ;j < obj.length ;j++ )
Ïà¹ØÎĵµ£º
ÔÚËãÊõÔËËã·û²¿·Ö£¬ÐèÒªÌرð×¢ÒâµÄÒ»¸öÓï·¨ÏÖÏóÊÇ“½úÉý”¡£½úÉýÖ¸µÍÓÚintµÄ3ÖÖÊý×ÖÀàÐÍ(byte¡¢shortºÍchar)½øÐÐËãÊõÔËËãºó£¬½á¹û»á×Ô¶¯ÌáÉý³ÉintÀàÐÍ¡£Ê¾Àý´úÂëÈçÏ£º
byte b1 = 10;
& ......
Following code is used for retrive all the record of Business Component from DataBase. package com.muti.records ;
import com.siebel.data.*;
import com.siebel.data.SiebelException;
public class DataBeanDemo {
private SiebelDataBean m_dataBean = null;
private SiebelBusObject m_busObject ......
Java IOѧϰ±Ê¼Ç£º×Ö·ûÁ÷
×Ö·ûÁ÷µÄ´¦ÀíºÍ×Ö½ÚÁ÷²î²»¶à£¬API»ù±¾ÉÏÍêÈ«Ò»Ñù£¬¾ÍÊǼÆÁ¿µ¥Î»²»Í¬¡£ÁíÍâ×Ö·ûÁ÷»¹ÌṩһЩÆäËûµÄ´¦ÀíÁ÷£¬±ÈÈç°´ÐжÁÈ¡Á÷¡¢×Ö·û´®Á÷µÈµÈ¡£
ÏÂÃæ¸ø¸öÀý×Ó¿´¿´£º
import java.io.*;
/**
* ×Ö·ûÁ÷²âÊÔ
*
* @author leizhimin 2008-8-27 22:16:44
*/
public cl ......
package Utils.Sort;
/**
*²åÈëÅÅÐò£¬ÒªÇó´ýÅÅÐòµÄÊý×é±ØÐëʵÏÖComparable½Ó¿Ú
*/
public class InsertSort implements SortStrategy
{
/**
*ÀûÓòåÈëÅÅÐòËã·¨¶Ôobj½øÐÐÅÅÐò
*/
......
ÔÚJava±àд¾ßÓÐÁ¬¹á±ä»¯µÄ´°¿Ú³ÌÐòʱ£¬Í¨³£µÄ°ì·¨ÊÇÔÚ×ÓÀàÖи²¸Ç¸¸ÀàµÄpaint(Graphics)·½·¨£¬ÔÚ·½·¨ÖÐʹÓÃGUIº¯ÊýʵÏÖ´°¿ÚÖØ»æµÄ¹ý³Ì¡£Á¬¹á±ä»»µÄ´°¿Ú»á²»¶ÏµØµ÷ÓÃupdate(Graphics)º¯Êý£¬¸Ãº¯Êý×Ô¶¯µÄµ÷ÓÃpaint(Graphics)º¯Êý¡£ÕâÑù¾Í»á³öÏÖÉÁ˸µÄÇé¿ö¡£
ΪÁ˽â¾öÕâÒ»ÎÊÌ⣬¿ÉÒÔÓ¦ÓÃË«»º³å¼¼Êõ¡£¿ÉÒÔͨ¹ý½ØÈ¡ÉÏÊö¹ý³Ì£¬¸ ......