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 ......
ÔÚ»ñÈ¡Îı¾µÄʱºò£¬¾³£Óöµ½Êý¾Ý¸ñʽµÄÎÊÌ⣬ÐèÒªÅжϻòת»»¡£
±¾ÎÄÖ¼ÔÚ½â¾öÈ«½Ç·ûºÅת»»Îª°ë½Ç·ûºÅµÄÎÊÌâ¡£
ÍøÉÏ´óÌåÓÐÁ½ÖÖ·½·¨£º×ª»»±àÂë»òÔòÌæ»»¡£
ÎÒʹÓõÄÊÇת»»±àÂë
1. string checkStr="£±£²£³456";
2. //ÅжÏÊÇ·ñ°üº¬È«½Ç×Ö·û[1]
3. if(checkStr.length() != checkStr.getBytes().length) ......
javaÖжÑÕ»(stack)ºÍ¶Ñ(heap)
Ò»¡¢¶ÑÕ»(stack)ºÍ¶Ñ(heap)£¿
£¨£±£©ÄÚ´æ·ÖÅäµÄ²ßÂÔ
¡¡¡¡°´ÕÕ±àÒëÔÀíµÄ¹Ûµã,³ÌÐòÔËÐÐʱµÄÄÚ´æ·ÖÅäÓÐÈýÖÖ²ßÂÔ,·Ö±ðÊǾ²Ì¬µÄ,ջʽµÄ,ºÍ¶ÑʽµÄ.
¡¡¾²Ì¬´æ´¢·ÖÅäÊÇÖ¸ÔÚ±àÒëʱ¾ÍÄÜÈ·¶¨Ã¿¸öÊý¾ÝÄ¿±êÔÚÔËÐÐʱ¿ÌµÄ´æ´¢¿Õ¼äÐèÇó,Òò¶øÔÚ±àÒëʱ¾Í¿ÉÒÔ¸øËûÃÇ·ÖÅä¹Ì¶¨µÄÄ ......
Õ⼸Ì죬ÔÚÍøÉÏËÑÁ˺ܶà¹ØÓÚjavaµÄ¶«Î÷£¬ÏÖÔÚ¸ø´ó¼Ò×ܽáһϣ¬·Ç³£ÓÐÓÃŶ£¬ºÜ¶à¶«Î÷ÎÒÃÇÔÚ¹úÄÚÊÇÎÞ·¨Á˽⵽µÄ
java³ÌÐòÔ±±ØÈ¥µÄ¹úÍâÍøÕ¾
http://www.onjava.com
ÿÖܶ¼ÓÐÐÂÎÄÕ·¢±í
http://www.developer.com/java
ÓÉGamelan.com ά»¤µÄJava¼¼ÊõÎÄÕÂÍøÕ¾
http://www.java.net
Sun¹«Ë¾Î¬»¤µÄÒ»¸öJavaÉçÇøÍøÕ¾
http:/ ......
×î½üÔËÐгÌÐò£¬ÀÏÊÇÓöµ½ÄÚ´æÒç³öµÄÎÊÌ⣬Out of Memory(ϵͳÄÚ´æ²»×ã)µÄÒì³£¡£×Ðϸ²é×ÊÁÏ£¬ºÃºÃѧϰÁËÒ»ÏÂÐéÄâ»úµÄ¼¸Ö»£¬²ÅÖªµÀ£¬ÕâÊÇÒòΪJavaÐéÄâ»úĬÈÏ·ÖÅäµÄÄÚ´æÖ»ÓÐ64M£¬Èç¹ûÓ¦ÓõıȽϴ󣬳¬³öÁË64M£¬JavaÐéÄâ»ú¾Í»áÅ׳öOutOfMemoryError£¬²¢Í£Ö¹ÔËÐС£ËùÒÔ£¬ ......