Java Reflection dzÎö2
inner classºÍouter classÖ®¼äµÄreflectionÓ¦Óá£
package com.gaoqian.reflection;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
class IncludeInnerClass implements Runnable{
class DefaultInnerClass{
int i;
public DefaultInnerClass(){}
DefaultInnerClass(int i){
this.i = i;
}
void innerMethod(){
System.out.println("I am DefaultInnerClass.");
}
}
private class PrivateInnerClass{
int i;
PrivateInnerClass(){}
PrivateInnerClass(int i){
this.i = i;
}
void innerMethod(){
System.out.println("I am PrivateInnerClass.");
}
}
public class PublicInnerClass{
int i;
p
Ïà¹ØÎĵµ£º
create PROCEDURE pagelist
@tablename nvarchar(50),
@fieldname nvarchar(50)='*',
@pagesize int output,--ÿҳÏÔʾ¼Ç¼ÌõÊý
@currentpage int output,--µÚ¼¸Ò³
@orderid nvarchar(50),--Ö÷¼üÅÅÐò
@sort int,--ÅÅÐò·½Ê½£¬1±íʾÉýÐò£¬0±íʾ½µÐòÅÅÁÐ
......
¿ÉÄÜ´ó¶àÊýJsp¿ª·¢Ô±ÔÚдÍê³ÌÐò²âÊÔͨ¹ýºó£¬²»Ì«»á¹Ø×¢JspÉú³ÉµÄJavaÎļþ£¬Æäʵ£¬Í¨¹ýJava´úÂ룬¸üÄÜÌåÏÖ³ÌÐò´úÂëµÄÕæÕýº¬Ò壬¶Ô½øÒ»²½Ñо¿³ÌÐò´úÂëµÄºǫ́ÔËÐÐÇé¿öÊǷdz£ÓаïÖúµÄ¡£ÀýÈ磬ÓÃJsp±àд´úÂëʱ£¬ÓÐʱºòÓÃ<%! %>£¬ÓÐʱºòÓÃ<% %>£¬¼Ó²»¼Ó¸Ð̾º ......
ÏÂÃæʹÓÃÒ»¸öjavaʵÏֵĵü´ú°æµÄµÝ¹é°æµÄ²åÈëÅÅÐò¡£
package sort;
import java.util.Date;
import java.util.Random;
/*
* ²åÈëÅÅÐò
*/
public class InsertSort{
public static void main(String args[])
{
int len = 20;
Date date = new Date();
Random random = new Random(date.getSeconds()); ......
ðÅÝÅÅÐòÊÇÒ»ÖÖºÜÁ÷Ðкܼòµ¥µÄÅÅÐòËã·¨£¬ËüÖظ´µÄ½»»»ÏàÁÚÁ½¸ö·´ÐòÔªËØ¡£
import java.util.Date;
import java.util.Random;
public class BubbleSort {
public static void main(String args[])
{
int len = 40;
Date date = new Date();
Random random = new Random(date.getSeconds());
int data[]=n ......
ÏÂÃæÊÇʹÓÃjavaʵÏֵĵݹéÄæÐò¶Ô²éÕÒ£¬ËùνµÄÄæÐò¶Ô¾ÍÊÇÔÚÊý×éA[]ÖÐÈç¹û i < j ,²¢ÇÒA[i] > A[j], ÔòÎÒÃÇ˵A[i]ºÍA[j]ÊÇÒ»¶ÔÄæÐò¶Ô¡£Èç¹ûÓÃÆÕͨµÄË㷨ʵÏֵĻ°£¬²éÕÒµÄʱ¼ä¸´ÔӶȣ¬ÊÇO(N*N)£¬Ê¹ÓÃÕâÀïµÄ¶Ó¹æµÄ·½Ê½²éÕҵĻ°£¬Ê±¼ä¸´ÔÓ¶ÈÊÇO(N*lgN)
import java.util.Date;
import java.util.Random;
/*
* ʹÓõݹ ......