JAVA·´Éä¼¼ÊõʾÀý2 Method called
package javatest_danny;
import java.lang.reflect.*;
public class refectmethodtest {
public static void main(String agrs[])
{
try
{
Class cmed=Class.forName("javatest_danny.baseclass");
Object ocmed=cmed.newInstance();
Method meds[]=cmed.getDeclaredMethods();
for(int i=0;i<meds.length;i++)
{
Class cs[]=meds[i].getParameterTypes();
Object obs[]=new Object[cs.length];
for(int j=0;j<cs.length;j++)
{
if(!cs[j].isPrimitive())
{
if(cs[j].getName().equalsIgnoreCase("java.lang.String"))
{
obs[j]=new String("chen junjie");
}
else
{
}
}
else if(cs[j].getName().equalsIgnoreCase("int"))
&
Ïà¹ØÎĵµ£º
package thread;
class QQ{
private String name;
private String sex;
boolean flag=false;
public synchronized void put(String name,String sex){
if(flag)
try {
wait();
} catch (InterruptedException e ......
package thread;
class ThreadTest4 implements Runnable{
private boolean flag=true;
public void stopMe(){
flag=false;
}
public void run() {
while (flag){
System.out.println(Thread.currentThread().getName()+" is running ");
&nbs ......
ÏÂÃæÊÇʹÓÃ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;
/*
* ʹÓõݹ ......
[ת]http://www.java3z.com/cwbwebhome/article/article2/2414.html?id=1101
/*
ÍøÒ³ÖÐµÄ±íµ¥Ê¹ÓÃPOST·½·¨Ìύʱ£¬Êý¾ÝÄÚÈݵÄÀàÐÍÊÇ application/x-www-form-urlencoded£¬ÕâÖÖÀàÐͻ᣺
1.×Ö·û"a"-"z"£¬"A"-"Z"£¬"0"-"9"£¬"."£¬"-"£¬"*"£¬ºÍ"_" ¶¼²»»á±»±àÂë;
2.½«¿Õ¸ñת»»Îª¼ÓºÅ (+) ;
3.½ ......
ÓÐʱÎÒÃÇÐèÒªËæ»úµÄÅÅÁÐÊý×éÖеÄÔªËØ£¬Ëæ»úÅÅÁÐÊý×飬Ŀǰ³£ÓõÄÓÐÁ½ÖÖ·½·¨£¬µÚÒ»ÖÖ¾ÍÊÇÔªËØA[i]¶ÔÓ¦Ò»¸öÓÅÏȼ¶P[i],¸ù¾ÝÓÅÏȼ¶×÷Ϊ¼üÖµÀ´´ÓÐÂÅÅÐòÊý×é;µÚ¶þÖÖ·½·¨¾ÍÊÇA[i]Ëæ»úµÄ¸úA[i]µ½A[n]ÖеÄÈÎÒâ¸öÔªËؽøÐн»»»,nΪÊý×éµÄ³¤¶È,ÏÂÃæÊÇÓÃjavaʵÏÖÒ»¸ö¼òµ¥ÊµÏÖ.
import java.util.Date;
import java.util.Random;
/*
......