javaÃæÊÔ
Ò»¡¢Java²¿·Ö£¨¹²40·Ö£©
1¡¢ ˵˵OverloadºÍOverrideµÄÇø±ð¡£OverloadedµÄ·½·¨ÊÇ·ñ¿ÉÒԸı䷵»ØÖµµÄÀàÐÍ£¿£¨5·Ö£©
OverloadÊǸ²¸Ç£¬×ÓÀàµÄ·½·¨¸ú¸¸Àà·½·¨Ãû×ÖÒ»Ñù£¬×ÓÀàµÄ·½·¨°Ñ¸¸ÀàµÄ¸²¸ÇÁË¡£
OverrideÊÇÖØÔØ£¬²»Í¬µÄ·½·¨²ÎÊý¡¢·µ»ØÖµ²»Ò»Ñù£¬½ô½ô·µ»ØÖµ²»Ò»ÑùµÄÁ½¸öº¯Êý²»½ÐÖØÔØ£¬±àÒë²»»áͨ¹ýµÄ¡£
OverloadedµÄ·½·¨ÊÇ¿ÉÒԸı䷵»ØÖµµÄÀàÐÍ¡£
2¡¢ Êý×éÓÐûÓÐlength()Õâ¸ö·½·¨? StringÓÐûÓÐlength()Õâ¸ö·½·¨£¿£¨5·Ö£©
Êý×éûÓÐlength()Õâ¸ö·½·¨£¬ÓÐlengthµÄÊôÐÔ¡£StringÓÐlength()Õâ¸ö·½·¨¡£
3¡¢ ˵Ã÷&ºÍ&&µÄÇø±ð£¨5·Ö£©
&ÊÇλÔËËã·û¡£&&ÊDz¼¶ûÂß¼ÔËËã·û¡£
4¡¢ SetÀïµÄÔªËØÊDz»ÄÜÖظ´µÄ£¬ÄÇôÓÃʲô·½·¨À´Çø·ÖÖظ´Óë·ñÄØ? ÊÇÓÃ==»¹ÊÇequals()? ËüÃÇÓкÎÇø±ð?(10)
SetÀïµÄÔªËØÊDz»ÄÜÖظ´µÄ£¬ÄÇôÓÃiterator()·½·¨À´Çø·ÖÖظ´Óë·ñ¡£equals()ÊÇÅжÁÁ½¸öSetÊÇ·ñÏàµÈ¡£
equals()ºÍ==·½·¨¾ö¶¨ÒýÓÃÖµÊÇ·ñÖ¸Ïòͬһ¶ÔÏóequals()ÔÚÀàÖб»¸²¸Ç£¬ÎªµÄÊǵ±Á½¸ö·ÖÀëµÄ¶ÔÏóµÄÄÚÈݺÍÀàÐÍÏàÅäµÄ»°£¬·µ»ØÕæÖµ¡£
5¡¢ д³öÒ»¸öº¯Êý£¬ÊµÏÖÊäÈë×Ö·û´®µÄµ¹Ö㨴ø²ÎÊý£¬´ø·µ»ØÖµ£©£º£¨10·Ö£©
public class Text {
public String check(String str){
String str1="";
if (str.equals("")){
str1=" ";
}else{
char[] strChar=str.toCharArray();
int n=strChar.length;
char lin;
for(int i=0;i<n;++i)
for(int j=0;j<n-1;++j)
if(strChar[j]>=strChar[j+1]){ &
Ïà¹ØÎĵµ£º
TomcatÊÇÒ»¸ö¿ª·ÅÔ´´úÂë¡¢ÔËÐÐservletºÍJSP WebÓ¦ÓÃÈí¼þµÄ»ùÓÚJavaµÄWebÓ¦ÓÃÈí¼þÈÝÆ÷¡£TomcatÓÉApache-Jakarta×ÓÏîÄ¿Ö§³Ö²¢ÓÉÀ´×Ô¿ª·ÅÐÔÔ´´úÂëJavaÉçÇøµÄÖ¾Ô¸Õß½øÐÐά»¤¡£Tomcat ServerÊǸù¾ÝservletºÍJSP¹æ·¶½øÐÐÖ´Ðеģ¬Òò´ËÎÒÃǾͿÉÒÔ˵Tomcat ServerҲʵÐÐÁËApache-Jakarta¹æ·¶ÇұȾø´ó¶àÊýÉÌÒµÓ¦ÓÃÈí¼þ·þÎñÆ÷ÒªºÃ¡£×öÎ ......
¡¡¡¡
ÔÚÃæÏò¶ÔÏó±à³ÌÖУ¬¶ÔÓÚÀ࣬¶ÔÏ󣬷½·¨£¬±äÁ¿µÈ·½ÃæµÄÃüÃûÊǷdz£Óм¼Çɵġ£±ÈÈ磬´óСдµÄÇø·Ö£¬Ê¹Óò»Í¬
×Öĸ¿ªÍ·µÈµÈ¡£µ«¾¿Æä±¾£¬×·ÆäÔ´£¬ÔÚΪһ¸ö×ÊÔ´ÆäÃû³ÆµÄʱºò£¬Ó¦¸Ã±¾×ÅÃèÊöÐÔÒÔ¼°Î¨Ò»ÐÔÕâÁ½´óÌØÕ÷À´ÃüÃû£¬²ÅÄܱ£Ö¤×ÊÔ´Ö®¼ä²»³åÍ»£¬²¢ÇÒÿһ¸ö¶¼±ãÓÚ¼Ç
Òä¡£
......
·´Éä»úÖÆ
Ìص㣺¶¯Ì¬»ñÈ¡ÀàÒÔ¼°ÀàÖгÉÔ±¡£
ͨ³£ÔÚ³ÌÐòÀ©Õ¹Ê±£¬»áʹÓø¸Àà»òÕß½Ó¿ÚÍê³É£¬Æäʵ¾ÍÊǶà̬¡£
ÔÚÕâÖÖÇé¿ö£¬ÔËÐÐʱ£¬»¹ÊÇÐèÒª¸øÆä´«µÝÒ»¸ö×Ô¶¨ÒåµÄ×ÓÀà¶ÔÏó¡£ÐèÒª×Ô¼ºnewÀ´Íê³É¡£
ËäÈ»Ð޸Ķ¯×÷ÒѾºÜÉÙÁË£¬µ«»¹ÊÇÐèÒªÐ޸IJ¿·Öϸ½Ú¡£
interface Inter{void show();}
class Demo{
  ......
µ±Ò»¸ö¸´ÔӵĶÔÏó±»¹¹Ôìʱ,ËüµÄ¹¹Ô캯Êý°´ÏÂÃæµÄ˳Ðò±»µ÷ÓÃ(that the order of constructor calls for a complex object is as follows)
1.Æä»ùÀà(base-class)µÄ¹¹Ô캯Êý±»µ÷ÓÃ,Õâ¸ö²½ÖèÒԵݹéµÄ·½Ê½Öظ´,ËùÒÔ×îµ×²ã(the root of hierarchy)µÄ¹¹Ô캯ÊýÊ×Ïȱ»Ö´ÐÐ,È»ºóÊÇËüÉÏÒ»²ãÅÉÉúÀà(the next-deriv ......
Java¶Ô¶ÔÏóºÍ»ù±¾µÄÊý¾ÝÀàÐ͵Ĵ¦ÀíÊDz»Ò»ÑùµÄ¡£¶Ô»ù±¾µÄÊý¾ÝÀàÐÍÀàËÆÓÚC/C++Öеķ½·¨£¨Öµ´«µÝ£©¡£ÔÚJavaÖÐÓöÔÏóµÄ×÷ΪÈë¿Ú²ÎÊýµÄ´«µÝÔòȱʡΪ"ÒýÓô«µÝ"£¬Ò²¾ÍÊÇ˵½ö½ö´«µÝÁ˶ÔÏóµÄÒ»¸ö"ÒýÓÃ"£¬Õâ¸ö"ÒýÓÃ"µÄ¸ÅÄîͬCÓïÑÔÖеÄÖ¸ÕëÒýÓÃÊÇÒ»ÑùµÄ¡£µ±º¯ÊýÌåÄÚ²¿¶ÔÊäÈë±äÁ¿¸Ä±äʱ£¬ÊµÖÊÉϾÍÊÇÔÚ¶Ô ......