Ñ¡ÔñÅÅÐòËã·¨µÄJAVAʵÏÖ
package Utils.Sort;
/**
*ÀûÓÃÑ¡ÔñÅÅÐò·¨¶ÔÊý×éÅÅÐò£¬Êý×éÖÐÔªËرØÐëʵÏÖÁËComparable½Ó¿Ú¡£
*/
public class ChooseSort implements SortStrategy
{
/**
*¶ÔÊý×éobjÖеÄÔªËØÒÔÑ¡ÔñÅÅÐòËã·¨½øÐÐÅÅÐò
*/
public void sort(Comparable[] obj)
{
if (obj == null)
{
throw new NullPointerException("The argument can not be null!");
}
Comparable tmp = null;
int index = 0;
for (int i = 0 ;i < obj.length - 1 ;i++ )
{
index = i;
tmp = obj[i];
for (int j = i + 1 ;j < obj.length ;j++ )
{
&n
Ïà¹ØÎĵµ£º
¶ÔÏóÐòÁл¯(Serializable)ÊÇÖ¸½«¶ÔÏóת»»Îª×Ö½ÚÐòÁеĹý³Ì£¬¶ø·´ÐòÁл¯ÔòÊǸù¾Ý×Ö½ÚÐòÁлָ´¶ÔÏóµÄ¹ý³Ì¡£
ÐòÁл¯Ò»°ãÓÃÓÚÒÔϳ¡¾°£º
1.ÓÀ¾ÃÐÔ±£´æ¶ÔÏ󣬱£´æ¶ÔÏóµÄ×Ö½ÚÐòÁе½±¾µØÎļþÖУ»
2.ͨ¹ýÐòÁл¯¶ÔÏóÔÚÍøÂçÖд«µÝ¶ÔÏó£»
3.ͨ¹ýÐòÁл¯ÔÚ½ø³Ì¼ä´«µÝ¶ÔÏó¡£
¶ÔÏóËùÊôµÄÀà±ØÐëʵÏÖSerializable»òÊÇExternalizable½Ó¿Ú ......
Main.cpp (Win/*nix)
#include "FlexSecurityBox.h"
int main(int argc, char ** argv) {
char * address;
short port;
if (argc == 2)
{
address = "0.0.0.0";
port = atoi(argv[1]);
} else if (argc == 3)
{
address = argv[1];
port = atoi(argv[2]);
} else
{
printf("Y ......
¶¨Ò嶯̬´úÀíÀàDynamicProxy
package com.zte.adc.common;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
public class DynamicProxy implements InvocationHandler {
private Object object;
// °ó¶¨¹Øϵ£¬Ò²¾ÍÊǹØÁªµ½Äĸö½Ó¿Ú£¨Óë ......
ÊÂÎñ´¦ÀíÊÇÆóÒµÓ¦ÓÃÐèÒª½â¾öµÄ×îÖ÷ÒªµÄÎÊÌâÖ®Ò»¡£J2EEͨ¹ýJTAÌṩÁËÍêÕûµÄÊÂÎñ¹ÜÀíÄÜÁ¦£¬°üÀ¨¶à¸öÊÂÎñÐÔ×ÊÔ´µÄ¹ÜÀíÄÜÁ¦¡£µ«ÊǴ󲿷ÖÓ¦Óö¼ÊÇÔËÐÐÔÚµ¥Ò»µÄÊÂÎñÐÔ×ÊÔ´Ö®ÉÏ£¨Ò»¸öÊý¾Ý¿â£©£¬ËûÃDz¢²»ÐèҪȫ¾ÖÐÔµÄÊÂÎñ·þÎñ¡£±¾µØÊÂÎñ·þÎñÒÑÈ»×ã¹»(±ÈÈçJDBCÊÂÎñ¹ÜÀí£©¡£
±¾ÎIJ¢²»ÌÖÂÛÓ¦¸Ã²ÉÓúÎÖÖÊÂÎñ´ ......