JAVA¶à̬ÐÔ
Ò»¡¢»ù±¾¸ÅÄî
¶à̬ÐÔ£º·¢ËÍÏûÏ¢¸øij¸ö¶ÔÏó£¬ÈøöÔÏó×ÔÐоö¶¨ÏìÓ¦ºÎÖÖÐÐΪ¡£
ͨ¹ý½«×ÓÀà¶ÔÏóÒýÓø³Öµ¸ø³¬Àà¶ÔÏóÒýÓñäÁ¿À´ÊµÏÖ¶¯Ì¬·½·¨µ÷Óá£
java µÄÕâÖÖ»úÖÆ×ñÑÒ»¸öÔÔò£ºµ±³¬Àà¶ÔÏóÒýÓñäÁ¿ÒýÓÃ×ÓÀà¶ÔÏóʱ£¬±»ÒýÓöÔÏóµÄÀàÐͶø²»ÊÇÒýÓñäÁ¿µÄÀàÐ;ö¶¨Á˵÷ÓÃ˵ijÉÔ±·½·¨£¬µ«ÊÇÕâ¸ö±»µ÷Óõķ½·¨±ØÐëÊÇÔÚ³¬ÀàÖж¨Òå¹ýµÄ£¬Ò²¾ÍÊÇ˵±»×ÓÀา¸ÇµÄ·½·¨¡£
1. Èç¹ûaÊÇÀàAµÄÒ»¸öÒýÓã¬ÄÇô£¬a¿ÉÒÔÖ¸ÏòÀàAµÄÒ»¸öʵÀý,»òÕß˵ָÏòÀàAµÄÒ»¸ö×ÓÀà¡£
2. Èç¹ûaÊǽӿÚAµÄÒ»¸öÒýÓã¬ÄÇô,a±ØÐëÖ¸ÏòʵÏÖÁ˽ӿÚAµÄÒ»¸öÀàµÄʵÀý¡£
OOÖм̳кͶà̬»¥ÏàÒÀÀµÓÖ»¥Ïàì¶Ü,ûÓм̳оͲ»¿ÉÄÜÓжà̬,¶à̬µÄʹÓÃÍùÍùÓÖÔÚÃæÏò¹ý³ÌµÄ´úÂëÖÐ.¼Ì³ÐÊÇʹ×ÓÀà¿ÉÒÔʹÓø¸ÀàµÄ¹¦ÄÜ,¶ø¶à̬ʹ¸¸ÀàÄÜʹÓÃ×ÓÀàµÄ¹¦ÄÜ.
¶þ¡¢Java¶à̬ÐÔʵÏÖ»úÖÆ
SUNÄ¿Ç°µÄJVMʵÏÖ»úÖÆ£¬ÀàʵÀýµÄÒýÓþÍÊÇÖ¸ÏòÒ»¸ö¾ä±ú£¨handle£©µÄÖ¸Õ룬Õâ¸ö¾ä±úÊÇÒ»¶ÔÖ¸Õ룺
Ò»¸öÖ¸ÕëÖ¸ÏòÒ»Õűí¸ñ£¬Êµ¼ÊÉÏÕâ¸ö±í¸ñÒ²ÓÐÁ½¸öÖ¸Õ루һ¸öÖ¸ÕëÖ¸ÏòÒ»¸ö°üº¬Á˶ÔÏóµÄ·½·¨±í£¬ÁíÍâÒ»¸öÖ¸ÏòÀà¶ÔÏ󣬱íÃ÷¸Ã¶ÔÏóËùÊôµÄÀàÐÍ£©£»
ÁíÒ»¸öÖ¸ÕëÖ¸ÏòÒ»¿é´Ójava¶ÑÖÐΪ·ÖÅä³öÀ´ÄÚ´æ¿Õ¼ä¡£
The Java Virtual Machine does not require any particular internal structure for objects. In Sun 's current implementation of the Java Virtual Machine, a reference to a class instance is a pointer to a handle that is itself a pair of pointers: one to a table containing the methods of the object and a pointer to the Class object that represents the type of the object, and the other to the memory allocated from the Java heap for the object data. £¨jvm¹æ·¶ÖйØÓÚ¶ÔÏóÄÚ´æ²¼¾ÖµÄ˵Ã÷£©
Èý¡¢×ܽá
1¡¢Í¨¹ý½«×ÓÀà¶ÔÏóÒýÓø³Öµ¸ø³¬Àà¶ÔÏóÒýÓñäÁ¿À´ÊµÏÖ¶¯Ì¬·½·¨µ÷Óá£
DerivedC c2=new DerivedC();
BaseClass a1= c2; //BaseClass »ùÀ࣬DerivedCÊǼ̳Ð×ÔBaseClassµÄ×ÓÀà
a1.play(); //play()ÔÚBaseClass£¬DerivedCÖоùÓж¨Ò壬¼´×ÓÀาдÁ˸÷½·¨
·ÖÎö£º
* Ϊʲô×ÓÀàµÄÀàÐ͵ĶÔÏóʵÀý¿ÉÒÔ¸²¸ø³¬ÀàÒýÓã¿
×Ô¶¯ÊµÏÖÏòÉÏתÐÍ¡£Í¨¹ý¸ÃÓï¾ä£¬±àÒëÆ÷×Ô¶¯½«×ÓÀàʵÀýÏòÉÏÒƶ¯£¬³ÉΪͨÓÃÀàÐÍBaseClass£»
* a.play()½«Ö´ÐÐ×ÓÀ໹ÊǸ¸ÀඨÒåµÄ·½·¨£¿
×ÓÀàµÄ¡£ÔÚÔËÐÐʱÆÚ£¬½«¸ù¾ÝaÕâ¸ö¶ÔÏóÒýÓÃʵ¼ÊµÄÀàÐÍÀ´»ñÈ¡¶ÔÓ¦µÄ·½·¨¡£ËùÒÔ²ÅÓжà̬ÐÔ¡£Ò»¸ö»ùÀàµÄ¶ÔÏóÒýÓ㬱»¸³Ó費ͬµÄ×Ó
Ïà¹ØÎĵµ£º
תÌû×Ô http://www.javaeye.com/topic/257191
javaÖÐhashcode()ºÍequals()µÄÏê½â
1. Ê×ÏÈequals()ºÍhashcode()ÕâÁ½¸ö·½·¨¶¼ÊÇ´ÓobjectÀàÖм̳йýÀ´µÄ¡£
equals()·½·¨ÔÚobjectÀàÖж¨ÒåÈçÏ£º
public boolean equals(Object obj) {
return (this == obj);
}
ºÜÃ÷ÏÔÊǶÔÁ½¸ö¶ÔÏóµÄµØÖ·Öµ½øÐеıȽϣ¨¼´±È½Ï ......
ʹÓÃJava²Ù×÷Îı¾ÎļþµÄ·½·¨Ïê½â
ÕªÒª: ×î³õjavaÊDz»Ö§³Ö¶ÔÎı¾ÎļþµÄ´¦ÀíµÄ£¬ÎªÁËÃÖ²¹Õâ¸öȱº¶¶øÒýÈëÁËReaderºÍWriterÁ½¸öÀ࣬ÕâÁ½¸öÀ඼ÊdzéÏóÀ࣬WriterÖÐ write(char[] ch,int off,int
length)£¬flush()ºÍclose()·½·¨Îª³éÏó·½·¨£¬ReaderÖÐread(char[] ch,int off,int length)ºÍclose()·½·¨ÊdzéÏó·½·¨¡£×ÓÀàÓ¦¸Ã·Ö± ......
ParserAdapter£¬MouseInputAdapter....
interface can be added to an existing class or used to create an adapter
·½·¨¾ÍÊÇ ÃæÏò½á¹¹ÓïÑԵģºº¯Êý
javaÖÐÊÊÅäÆ÷µÄ×÷ÓÃʵ¼ÊÉÏÊÇʵÏÖÁ˽ӿڵÄÀ࣬µ«ÊÇÊÊÅäÆ÷ËùʵÏÖµÄÖ»ÊÇ¿Õ·½·¨¡£ÒòΪÈç¹ûÎÒÃDz»ÓÃÊÊÅäÆ÷£¬Ö±½ÓȥʵÏÖ½Ó¿Ú£¬Ò²ÒªÖð¸öʵÏÖÀïÃæµÄ·½·¨£¬²¢ÇÒ´ó¶àÇé¿öÏÂÎÒÃÇ ......
2010-03-18
package javaEcsl;
import java.io.*;
import java.util.*;
import jxl.Cell;
import jxl.Sheet;
import jxl.Workbook;
/** */
/**
* <p>
* Title:
* </p>
* <div>Description: ExcelÊý¾Ýµ¼Èëµ½oracleÊý¾Ý¿âÀà. </div>
* <p>
* Copyright: Copyright (c) 200 ......