javaËæ»úÊýµÄ²úÉú
1. import java.util.*;
2.(A) public class Test
{ public static void main(String[] args)
{
//Éú³É [0-n) ¸ö²»Öظ´µÄËæ»úÊý st ÓÃÀ´±£´æÕâЩËæ»úÊý
ArrayList list = new ArrayList();
int n = 10;
Random rand = new Random();
boolean[] bool = new boolean[n];
int num =0;
for (int i = 0; i<n; i++)
{
do{//Èç¹û²úÉúµÄÊýÏàͬ¼ÌÐøÑ»·
num = rand.nextInt(n);
}while(bool[num]);
bool[num] =true;
list.add(num);
}
System.out.println (list);
}
(B)
public class Test
{
public static void main(String[] args)
{
&
Ïà¹ØÎĵµ£º
ÓÐÁ½ÖÖ·½Ê½£º¾²Ì¬²¿ÊðºÍ¶¯Ì¬²¿Êð¡£ÔÚÏÂÎÄÖÐ$CATALINA_HOMEÖ¸µÄÊÇTomcat¸ùĿ¼¡£
Ò»¡¢¾²Ì¬²¿Êð
¾²Ì¬²¿ÊðÖ¸µÄÊÇÎÒÃÇÔÚ·þÎñÆ÷Æô¶¯Ö®Ç°²¿Êð³ÌÐò£¬Ö»Óе±·þÎñÆ÷Æô¶¯Ö®ºó£¬WebÓ¦ÓóÌÐò²ÅÄÜ·ÃÎÊ¡£ÒÔÏÂ3Öз½Ê½¶¼¿ÉÒÔ²¿Êð£º
1¡¢½«PetWebĿ¼¿½±´µ½$CATALINA_HOME\webappsÏ£¬È»ºóÆô¶¯·þÎñÆ÷¾Í¿ÉÒÔÁË¡£ÕâÖÖ·½Ê½±È½Ï¼òµ¥£¬µ«ÊÇweb ......
/*ͨ¹ýÊó±êÍÏ·ÅÎļþµ½Öƶ¨¿Ø¼þÖУ¬²¢ÅжÏÊÇ·ñΪÎļþ£¬Èç¹ûÊÇ£¬Ôòµ÷ÓÃÎļþ·¢ËÍ·½·¨ChatFrame.SendFile(finalpath);
*/
class TextDropTargetListener implements DropTargetListener
{
CODER Coder = new CODER();
CHAT_FRAME ChatFrame;
/**
Constructs a listener.
@param aTextArea the ......
Javaѧϰ´ÓÈëÃŵ½¾«Í¨
ѧϰǰÁ˽â
Ò»¡¢ JDK (Java Development Kit)
JDKÊÇÕû¸öJavaµÄºËÐÄ£¬°üÀ¨ÁËJavaÔËÐл·¾³£¨Java Runtime Envirnment£©£¬Ò»¶ÑJava¹¤¾ßºÍJava»ù´¡µÄÀà¿â(rt.jar)¡£²»ÂÛʲôJavaÓ¦Ó÷þÎñÆ÷ʵÖʶ¼ÊÇÄÚÖÃÁËij¸ö°æ±¾µÄJDK¡£Òò´ËÕÆÎÕJDKÊÇѧºÃJavaµÄµÚÒ»²½¡£×îÖ÷Á÷µÄJDKÊÇSun¹«Ë¾·¢²¼µÄJDK£¬³ýÁËSunÖ®Í⣠......
import java.awt.Container;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.IOException;
import java.io.Serializable;
import java.rmi.Na ......