¹ØÓÚjavaµÄ¼¯ºÏÀà,ÒÔ¼°HashMapÖÐSetµÄÓ÷¨!
¹ØÓÚjavaµÄ¼¯ºÏÀà,ÒÔ¼°HashMapÖÐSetµÄÓ÷¨!
2005-10-22 14:47:43 Sat | ÔĶÁ£¨547£©´Î
package com.tiantian;
import java.util.*;
public class JAVAContainer {
public static void main(String[] args) throws Exception {
// ArrayList
{
ArrayList arraylist = new ArrayList();
arraylist.add(0, "end");//Ö¸¶¨Ë÷Òý¼ÓÈëÖµ
// Ðè×¢ÒâµÄÊÇ£¬Èç¹ûÏÖÓÐ2¸öÖµ£¬ÎÒ¼ÓÈëË÷ÒýΪ5µÄÄÇô¾Í»á³öÏÖÒì³£
for (int i = 0; i < 2; i++) {
arraylist.add(i, String.valueOf(i));
}
System.out.println("ArrayList:");
for (int i = 0; i < arraylist.size(); i++) {
System.out.print(arraylist.get(i) + ";");
}
arraylist.add("0");//Ö±½Ó¼ÓÈëÖµµ½ArrayListµÄ×îºó
arraylist.add("0");
System.out.print(" ArrayList's lastIndexOf("0") is "
Ïà¹ØÎĵµ£º
ʹÓÃJava³ÌÐò´ÓÊý¾Ý¿âÖвéѯ´óÁ¿µÄÊý¾ÝʱÈÝÒ׳öÏÖÒì³£:
java.lang.OutOfMemoryError: Java heap space
ÔÚJVMÖÐÈç¹û98£¥µÄʱ¼äÊÇÓÃÓÚGCÇÒ¿ÉÓÃµÄ Heap size ²»×ã2£¥µÄʱºò½«Å׳ö´ËÒì³£ÐÅÏ¢¡£
»¹ÓÐʹÓÃjxl¶ÁдexcelÎļþʱ£¬Í¬Ê±¶ÁÈëËùÓмǼ£¬Ò²ÈÝÒ׳öÏÖÕâ¸öÎÊÌâ¡£
JVM¶ÑµÄÉèÖÃÊÇÖ¸java³ÌÐòÔËÐйý³ÌÖÐJVM¿ÉÒÔµ÷ÅäʹÓõÄÄÚ ......
´Ó×î³£¹æµÄ·Ö²ã½á¹¹À´Ëµ£¬ÏµÍ³²ã´Î´ÓÉϵ½ÏÂÒÀ´ÎΪ£º
±íÏֲ㣺Ö÷ÒªÊÇ¿Í»§¶ËµÄչʾ¡£
·þÎñ²ã£ºÖ±½ÓΪ¿Í»§¶ËÌṩµÄ·þÎñ»ò¹¦ÄÜ¡£Ò²ÊÇϵͳËùÄܶÔÍâÌṩµÄ¹¦ÄÜ¡£
ÁìÓò²ã£ºÏµÍ³ÄÚµÄÁìÓò»î¶¯¡£
DAO²ã£ºÊý¾Ý·ÃÎʶÔÏó£¬Í¨¹ýÁìÓòʵÌå¶ÔÏóÀ´²Ù×÷Êý¾Ý¿â¡£
ÆäÖÐÓÐЩָµ¼ÔÔò£º
& ......
¹ØÓÚflex´¦Àíjava ʵÌåbean£¬ÎÒÒ²²éÁ˺öà×ÊÁÏ£¬ÏÖÔÚÖÕÓڸ㶨£¬Ð´Ò»¸ö¼òµ¥µÄÀý×Ó£¬·ÖÏí¸ø´ó¼Ò
¸ßÊ־Ͳ»Óÿ´ÁË
/*studentʵÌåÀà=java*/
public class Student implements java.io.Serializable{
private String sNo;
private String sName;
get..
set..
}
/*flex asÀà Student.as*/
packa ......
java´ò°ü-exeÎļþ-×îÖÕÒÔsetupÐÎʽ·¢²¼µÄ½â¾öÖ®µÀ
java´ò°ü-exeÎļþ-×îÖÕÒÔsetupÐÎʽ·¢²¼µÄ½â¾öÖ®µÀ
Ê×ÏÈ£¬½«±àÒëºÃµÄ³ÌÐò´ò°ü³ÉjarÎļþ£¬È»ºó×ö³öexe£¬ÕâÑù´úÂë¾Í²»¿É¼ûÁË£»µ«ÊÇexeÎļþÔÚûÓа²×°jreµÄµçÄÔÉϲ»ÄÜÔËÐУ¬Èç¹ûÒªÇó¿Í»§ÔÙÈ¥°²×°jre ÉèÖû·¾³±äÁ¿ ¾Í²»ÑÅÁË¡£ÎÒÃÇÐèÒª½«jre´ò°ü¡£
Õ⼸²½²Ù×÷Í ......
ClassLoaderÒ»¸ö¾³£³öÏÖÓÖÈúܶàÈËÍû¶øÈ´²½µÄ´Ê£¬±¾ÎĽ«ÊÔͼÒÔ×îdzÏÔÒ׶®µÄ·½Ê½À´½²½â ClassLoader£¬Ï£ÍûÄܶԲ»Á˽â¸Ã»úÖƵÄÅóÓÑÆðµ½Ò»µãµã×÷Óá£
ÒªÉîÈëÁ˽âClassLoader£¬Ê×ÏȾÍÒªÖªµÀClassLoaderÊÇÓÃÀ´¸ÉʲôµÄ£¬¹ËÃû˼Ò壬Ëü¾ÍÊÇÓÃÀ´¼ÓÔØClassÎļþµ½JVM£¬ÒÔ¹©³ÌÐòʹÓõġ£ÎÒÃÇÖªµÀ£¬java³ÌÐò¿ÉÒÔ¶¯Ì¬¼ÓÔØÀඨÒ壬¶øÕâ ......