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

Java ¼Ì³ÐСÀý

¿´¿´ÏÂÃæ³ÌÐò½«Êä³öʲô½á¹û£º
/**
* ShowExtending
* ÑÝʾ¼Ì³ÐʱµÄÏÖÏó
*/
class SupCls {
static String s1 = "¸¸ÀàÀà±äÁ¿s1";
String s2 = "¸¸ÀàʵÀý±äÁ¿s2";
SupCls(){
System.out.println("¸¸À๹ÔìÆ÷±»·ÃÎÊ");
}
public static void f1(){
System.out.println("¸¸Àà static:f1() ±»·ÃÎÊ");
}
public void f2(){
System.out.println("¸¸Àà instance:f2() ±»·ÃÎÊ");
}
}
public class ShowExtending extends SupCls {
static String s1 = "×ÓÀàÀà±äÁ¿s1";
String s2 = "×ÓÀàʵÀý±äÁ¿s2";
ShowExtending(){
// ϵͳ»áµ÷Óø¸ÀàµÄĬÈÏ£¨Ã»ÓвÎÊý£©¹¹ÔìÆ÷
// Èç¹û¸¸ÀàĬÈϹ¹ÔìÆ÷±»¸²¸ÇÒÔÖÂûÓÐÎ޲ι¹ÔìÆ÷£¬Ôò±àÒë³ö´í
// ´ËʱӦ¸Ãµ÷Óà super( /*²ÎÊý*/ ); ÏÔʾµ÷Óø¸À๹ÔìÆ÷
System.out.println("×ÓÀ๹ÔìÆ÷±»·ÃÎÊ");
}
public static void f1(){
System.out.println("×ÓÀà static:f1() ±»·ÃÎÊ");
}
public void f2(){
System.out.println("×ÓÀà instance:f2() ±»·ÃÎÊ");
}
public static void main(String[] args) {
// ´´½¨×ÓÀà¶ÔÏóʱ»á´´½¨¸¸Àà¶ÔÏ󣬻áµ÷Óø¸À๹ÔìÆ÷
SupCls a = new SupCls();
ShowExtending b = new ShowExtending();
SupCls c = b;
// ²âÊÔͨ¹ý²»Í¬·½Ê½·ÃÎʸ¸ÀàºÍ×ÓÀàµÄÊý¾Ý³ÉÔ±
System.out.println("a.s1£º" + a.s1);
System.out.println("a.s2£º" + a.s2);
System.out.println("b.s1£º" + b.s1);
System.out.println("b.s2£º" + b.s2);
System.out.println("c.s1£º" + c.s1);
System.out.println("c.s2£º" + c.s2);
// ²âÊÔͨ¹ý²»Í¬·½Ê½·ÃÎʸ¸ÀàºÍ×ÓÀàµÄ·½·¨³ÉÔ±
System.out.print("a.f1():");
a.f1();
System.out.print("a.f2():");
a.f2();
System.out.print("b.f1():");
b.f1();
System.out.print("b.f2():");
b.f2();


Ïà¹ØÎĵµ£º

Java Scanner NoSuchElementException

½ñÌìͬѧÎÊÎÒÒ»¸öJavaÎÊÌ⣬´úÂë½á¹¹ÈçÏ£º
Scanner scan = new Scanner(System.in);
scan.next();
scan.close();
scan = new Scanner(System.in);
scan.next(); 
µ±³ÌÐòÔËÐе½µÚÎåÐÐÊÇ»áÅ׳öjava.util.NoSuchElementException
          at&nb ......

JavaÁ¬½ÓOracleÎÊÌâ

JavaÖ´ÐÐstm.executeQuery(sql); ʱ×ÜÊÇÌáʾ£ºjava.sql.SQLException: ORA-00911: ÎÞЧ×Ö·û£¬ÅªÁË°ëÌ컹Êdzö´í£¬ÎÞÄΣ¬ÄóöɱÊÖïµ£¬Googleһϣ¬Ôε¹£¬·¢ÏÖÎÒµÄString  sql = “select detail from test.result where person_id = 4; "£¬Ã²ËÆû´íÎó°É£¬½á¹ûÎÒÎÒ±ØÐëÈ¥µô×îºó·ÖºÅ£¬±¾À´ÊÇÏë¸ãµÃרҵµã£¬¾Í¼Û¼Ó¸ö·Ö ......

javaÃæÊÔÌâ

JAVAÃæÊÔÌ⼯- -
»ù´¡ÖªÊ¶£º
1.C++»òJavaÖеÄÒì³£´¦Àí»úÖƵļòµ¥Ô­ÀíºÍÓ¦Óá£
µ±JAVA³ÌÐòÎ¥·´ÁËJAVAµÄÓïÒå¹æÔòʱ£¬JAVA
ÐéÄâ»ú¾Í»á½«·¢ÉúµÄ´íÎó±íʾΪһ¸öÒì³£¡£Î¥·´ÓïÒå¹æÔò°üÀ¨2ÖÖÇé¿ö¡£Ò»ÖÖÊÇJAVAÀà¿âÄÚÖõÄÓïÒå¼ì²é¡£ÀýÈçÊý×éϱêÔ½½ç,»áÒý·¢
IndexOutOfBoundsException;·ÃÎÊnullµÄ¶ÔÏóʱ»áÒý·¢NullPointerExcepti ......

java¶þ·Ö²éÕÒ

¶þ·Ö²éÕÒ£º
   ¶þ·Ö²éÕÒ±ÈÏßÐÔ²éÕÒÊý¶ÈÒªºÃºÜ¶à£¬ÓÈÆäÊǶԴóÊý×éÀ´Ëµ¸üΪÏÔÖø£¬¾ÍÏñÊDzÂ×ÖÓÎÏ·Ò»Ñù
²Â×ÖÓÎÏ·£º
   ¶þ·Ö²éÕҵķ½·¨ºÍÎÒÃÇСʱºòÍæµÄ²Â×ÖÓÎÏ·ÊÇÒ»ÑùµÄ¡£ÔÚÕâ¸öÓÎÏ·ÀïÃ棬ÓÐÒ»¸öСÅóÓÑ»áÈÃÄã²ÂËýÕýÔÚÏëµÄÒ»¸ö1ÖÁ100Ö®¼äµÄÊý£¬
Äã²ÂÁËÒ»¸öÊýÒÔºó£¬Ëý»á¸æËßÄãÈýÖÖÑ¡ÔñÖеÄÒ»¸ö£ºÄã² ......

ÓÃInstallAnywhere´ò°üJava³ÌÐò°üº¬MySQLÊý¾Ý¿â

ÓÃInstallAnywhere´ò°üJava³ÌÐò°üº¬MySQLÊý¾Ý¿â
 
InstallAnywhere´ò°üJava³ÌÐòʱ¿ÉÒÔ×Ô¶¯Íê³ÉjreµÄ´ò°ü£¬µ«ÊÇÐèÒªMySQLÊý¾Ý¿âµÄ³ÌÐò¾ÍµÃÊÖ¶¯Ìí¼Ó¡£×ÊÁÏÌ«ÉÙ£¬¾À½áÁËÈýÌ죬ÖÕÓÚ½â¾ö
 
1¡¢  ÏÂÔØÂÌÉ«°æµÄMySQL£¬¿ÉÒÔÈ¥¹ÙÍøÏÂÔØ¡£ÍøÓÑÖÆ×÷ÁËMySQLµÄÂÌÉ«¾«¼òBat°æ£¨http://download.csdn.net/source/524812 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ