javaµãµÎ1
String Óë StringBufferÇø±ð:
String×Ö·û´®¶ÔÏóÊDz»¿É±äµÄ£»StringBufferÊDZ䳤ºÍ¿ÉдµÄ¶¯Ì¬×Ö·ûÐòÁУ¬¿ÉÒÔ×Ô¶¯µØÔö¼Ó¿Õ¼ä¡£
Integer var = new Integer();//ÓÐÓï·¨´íÎó
Integer var = new Integer(2);//悦﵀
javaµÄVector³ÉÔ±ÊÇÒªÓÃelementAt(i)³ÉÔ±º¯ÊýÀ´»ñµÃµÄ£¬²»ÄÜÓÃve[i]µÃµ½¡£
Vector::public Enumeration<E> elements() ·µ»Ø´ËÏòÁ¿µÄ×é¼þµÄö¾Ù¡£
Vector v = new Vector();
v.add("aaaaaaaa");
v.add("bbbbbbbbbbbb");
for (Enumeration e = v.elements(); e.hasMoreElements();)
{
System.out.println(e.nextElement());
}
//Êä³ö
//aaaaaaaa
//bbbbbbbbbbbb
byteÀàÐÍÊÇÓдø·ûºÅµÄ£¬¼´ÓÐÕý¸ºµÄ£¬ÊÇÒ»¸ö×ֽڵģ¬charÊÇÁ½¸ö×Ö½Ú£¬ÎÞÕý¸ºµÄ£¬char c = 'a';
Ïà¹ØÎĵµ£º
·´ÉäÊÇJavaÓïÑÔÖкÜÖØÒªµÄÒ»¸ö×é³É²¿·Ö£¬ËùÒԾʹ˻°ÌâÌÖÂÛµÄ×ÊÔ´¿ÉνÊýÖ®²»¾¡£¬ÈÕ³£¿ª·¢Ò²»á¾³£Ê¹Óõ½¹ØÓÚ·´ÉäµÄReflection
API¡£Java5.0
Tiger³öÏÖÒԺ󣬸ü¶Ô·´ÉäAPIÓÐÁËеÄÀ©Õ¹£¬¾¡¹ÜÌÖÂ۵Ļ°ÌâºÜ¶à£¬²»¹ýÎÒ»¹ÊǾõµÃ²»¹»È«Ã棬ÓÈÆäÊǶԷºÐÍÕâÒ»¿é£¬ËùÒÔ¾ÍÎÒËùÖª£¬ÔÙ»¨Á¦Æø×ܽáÒ»·¬
Ê×ÏÈ·´ÉäµÄÈë¿ÚÊÇ´ÓClass¿ ......
1.JVMµÄgc¸ÅÊö
¡¡¡¡gc¼´À¬»øÊÕ¼¯»úÖÆÊÇÖ¸jvmÓÃÓÚÊÍ·ÅÄÇЩ²»ÔÙʹÓõĶÔÏóËùÕ¼ÓõÄÄÚ´æ¡£javaÓïÑÔ²¢²»ÒªÇójvmÓÐgc£¬Ò²Ã»Óй涨gcÈçºÎ¹¤×÷¡£²»¹ý³£ÓõÄjvm¶¼ÓÐgc£¬¶øÇÒ´ó¶àÊýgc¶¼Ê¹ÓÃÀàËƵÄËã·¨¹ÜÀíÄÚ´æºÍÖ´ÐÐÊÕ¼¯²Ù×÷¡£
¡¡¡¡ÔÚ³ä·ÖÀí½âÁËÀ¬»øÊÕ¼¯Ëã·¨ºÍÖ´Ðйý³Ìºó£¬²ÅÄÜÓÐЧµÄÓÅ»¯ËüµÄÐÔÄÜ¡£ÓÐЩÀ¬»øÊÕ¼¯×¨ÓÃÓÚÌØÊâµÄ ......
3.Sun HotSpot
¡¡¡¡1.4.1 JVM¶Ñ´óСµÄµ÷Õû
¡¡¡¡Sun HotSpot 1.4.1ʹÓ÷ִúÊÕ¼¯Æ÷£¬Ëü°Ñ¶Ñ·ÖΪÈý¸öÖ÷ÒªµÄÓò£ºÐÂÓò¡¢¾ÉÓòÒÔ¼°ÓÀ¾ÃÓò¡£JvmÉú³ÉµÄËùÓÐжÔÏó·ÅÔÚÐÂÓòÖС£Ò»µ©¶ÔÏó¾ÀúÁËÒ»¶¨ÊýÁ¿µÄÀ¬»øÊÕ¼¯Ñ»·ºó£¬±ã»ñµÃʹÓÃÆÚ²¢½øÈë¾ÉÓò¡£ÔÚÓÀ¾ÃÓòÖÐjvmÔò´æ´¢classºÍmethod¶ÔÏó¡£¾ÍÅäÖöøÑÔ£¬ÓÀ¾ÃÓòÊÇÒ»¸ö¶ÀÁ¢Óò²¢ÇÒ²» ......
Ò»¸öʹÓÃÁ˶ÓÁеÄͨÓÃʵÏÖ£º
http://blog.csdn.net/chaosllgao/archive/2009/05/23/4211183.aspx
´ËÎÄÃèÊöÁËÒ»ÖÖ¸ü¼òµ¥µÄÄ£ÐÍ
1. ͬʱֻÓÐ1¸öÉú²úÕߺÍ1¸öÏû·ÑÕß
2. ²»ÓöÓÁУ¬Í¬Ê±Ö»ÓÐÒ»¸ö²úÆ·
3. Éú²úÕßÿ´ÎÉú²ú1¸ö0µ½100Ö®¼äµÄËæ»úÊý£¬Ïû·ÑÕßÔò°Ñ¸ÃËæ»úÊý´òÓ¡³öÀ´¡£Èç¹û²úÉúµÄËæ»úÊýΪ0£¬Ôò ......
ÓÐÈË·´Ó³¿´²»µ½Ô´Â룬·¢ÏÖÊÇCSDNµÄ´úÂë¿Ø¼þÓÐÎÊÌ⡣ϣÍûCSDNºÃºÃ¸Ä½øһϡ£
ÔÝʱÏÈÒÔÎı¾·½Ê½·¢²¼³öÀ´£¬¸ñʽ»á±äÑù¡£
import java.util.LinkedList;
public class ProducerConsumer
{
/**
* @param args
*/
public static void main(String[] args)
{
Queue queue = ......