Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

JavaÖеġ°==¡±ºÍequal()

Integer n1 = new Integer(1);
Integer n2 = new Integer(1);
System.out.println(n1==n2); // false
Integer n1 = new Integer(3);
Integer n2 = new Integer(3);
System.out.println(n1.equals(n2)); //true

equals()ĬÈÏÒ²ÊDZȽÏreference£¬µ«ÊÇJavaÖеÄclass¸²¸ÇÁËequals()·½·¨


Ïà¹ØÎĵµ£º

C++ºÍJavaµÄ¶à¼Ì³Ð


¶à¼Ì³Ð£º
C++ÖеÄÀà¿ÉÒÔÖ±½ÓʵÏÖ¶à¼Ì³Ð È磺class D:public A,public B,public C{……};
JavaÖв»ÄÜÖ±½ÓʵÏÖÕâÑùµÄ¶à¼Ì³Ð£¬µ«ÊÇ¿ÉÒÔÓýӿڣ¨interface£©À´¼ä½ÓʵÏÖ È磺
public class A{ ……}
public interface C{
¡¡¡¡public void c1();
¡¡¡¡public void c2();
}
public class C exten ......

×îÖØÒªµÄ Java EE ×î¼Ñʵ¼ù 2. ²»Òª×öÖظ´µÄ¹¤×÷¡£


2. ²»Òª×öÖظ´µÄ¹¤×÷¡£
ʹÓó£¼ûµÄ¡¢¾­¹ý֤ʵµÄ¿ò¼Ü£¬Èç Apache Struts¡¢JavaServer Faces ºÍ Eclipse RCP¡£Ê¹Óþ­¹ý֤ʵµÄģʽ¡£
»Øµ½ÎÒÃÇ¿ªÊ¼°ïÖú¿Í»§Ê¹ÓøճöÏÖµÄ Java EE ±ê×¼µÄʱºò£¬ÎÒÃÇ·¢ÏÖ£¨ºÍÐí¶àÆäËûÈËÒ»Ñù£©£¬Í¨¹ýÖ±½ÓʹÓûù´¡µÄ Servlet ºÍ JSP ¹æ·¶¹¹½¨ UI Ó¦ÓóÌÐòÀ´¿ª·¢Óû§½Ó¿Ú¿ª·¢¿ò¼Ü£¬¿ÉÒÔ¼«´óµØÌḠ......

JavaÀíÂÛÓëʵ¼ù:ÕýȷʹÓÃvolatile±äÁ¿

Java™ÓïÑÔ°üº¬Á½ÖÖÄÚÔÚµÄͬ²½»úÖÆ£ºÍ¬²½¿é£¨»ò·½·¨£©ºÍvolatile±äÁ¿¡£ÕâÁ½ÖÖ»úÖƵÄÌá³ö¶¼ÊÇΪÁËʵÏÖ´úÂëÏ̵߳ݲȫÐÔ¡£ÆäÖÐvolatile±äÁ¿µÄͬ²½ÐԽϲµ«ÓÐʱËü¸ü¼òµ¥²¢ÇÒ¿ªÏú¸üµÍ£©£¬¶øÇÒÆäʹÓÃÒ²¸üÈÝÒ׳ö´í¡£ÔÚÕâÆÚµÄJavaÀíÂÛÓëʵ¼ùÖУ¬Brian Goetz½«½éÉܼ¸ÖÖÕýȷʹÓÃvolatile±äÁ¿µÄģʽ£¬²¢Õë¶ÔÆäÊÊÓÃÐÔÏÞÖÆÌá³öÒ» ......

java ²âÊÔ


<!--
/* Font Definitions */
@font-face
{font-family:ËÎÌå;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"\@ËÎÌå" ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ