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

javaÏß³ÌѧϰÀý×Ó

public class TextDemo {
public static void main(String[] args) {
RunnableEemo r1 = new RunnableEemo();
r1.REemo(r1);
System.out.println(r1.print());
}
}
class RunnableEemo extends ThreadRun implements Runnable {
Thread t2 = null;
public void REemo(RunnableEemo r1) {
Thread t1 = new Thread(r1, "µÚÒ»Ïß³Ì ");
System.out.println("ÕýÔÚÔËÐеÄÊÇ" + t1);
t2 = new Thread(r1, "µÚ¶þÏß³Ì");
System.out.println("´´½¨µÚ¶þÏß³Ì");
System.out.println("µÚÒ»Ï߳̿ªÊ¼ÐÝÃß");
t2.start();
try {
t1.sleep(400);
} catch (InterruptedException e) {
System.out.println("µÚÒ»Ï̴߳íÎó ");
}
System.out.println("µÚÒ»Ïָ̻߳´ÔËÐÐ ");
}
public void run() {
try {
for (int i = 0; i < 800; i += 100) {
System.out.println("µÚ¶þÏ̵߳ÄÐÝÃßʱ¼ä£º " + i);
t2.sleep(i);
}
} catch (InterruptedException e) {
System.out.println("µÚ¶þÏ̴߳íÎó£¡");
}
}
}
class ThreadRun {
public String print() {
return "ÎÒÊÇRunnableDemoµÄ¸¸À࣡";
}
}


Ïà¹ØÎĵµ£º

java½â»óÖ®¾²Ì¬·½·¨¸²¸Ç

class Dog {
public static void bark() {
System.out.print("woof ");
}
}
class Basenji extends Dog {
public static void bark() { }
}
public class Bark {
public static void main(String args[]) {
Dog woofer = new Dog();
Dog nipper = new Basenji();
woofer.bark();
nipper.bark();
}
}
ËæÒâµØ ......

³õʶJavaÃæÏò¶ÔÏóµÄÌØÐÔ

OOPµÄÌØÐÔÖ÷ÒªÓУº1¡¢·â×°£»2¡¢¼Ì³Ð£»3¡¢¶à̬¡£ÏÂÃæ´ÓÕ⼸¸ö·½Ãæ¾ßÌå²ûÊö¡£
1¡¢·â×°
·â×°Äܽ«ÀàµÄ¾ßÌåÐÅÏ¢Òþ²ØÆðÀ´£¬Ê¹µÃÊý¾ÝµÃµ½±£»¤¡£Æä¾ßÌåʵʩÖ÷ÒªÊÇÒÀ¿¿·ÃÎÊ¿ØÖÆ»úÖÆÈ¨ÏÞ£¬ÆäȨÏÞÖ÷ÒªÓÐËÄÖÖ£º1¡¢private£»2¡¢default£¨C++ûÓÐÕâÖÖȨÏÞ£©£»3¡¢protected£»4¡¢public¡£ÔÚÕâËÄÖÖȨÏÞϵÄÊý¾ÝÔÚÍâ½çµÄ¿É¼ûÐÔ²»Í¬¡£Private ......

java µ½Êý¾Ý¿â


public ActionForward backUpAction(ActionMapping mapping, ActionForm form,   
            HttpServletRequest request, HttpServletResponse response)   
    &n ......

È«Ãæ·ÖÎöJavaµÄÀ¬»ø»ØÊÕ»úÖÆ

JavaµÄ¶ÑÊÇÒ»¸öÔËÐÐʱÊý¾ÝÇø£¬ÀàµÄʵÀý(¶ÔÏó)´ÓÖзÖÅä¿Õ¼ä¡£JavaÐéÄâ»ú(JVM)
µÄ¶ÑÖд¢´æ×ÅÕýÔÚÔËÐеÄÓ¦ÓóÌÐòËù½¨Á¢µÄËùÓжÔÏó£¬ÕâЩ¶ÔÏóͨ¹ýnew¡¢newarray¡¢anewarrayºÍmultianewarrayµÈÖ¸Á
Á¢£¬µ«ÊÇËüÃDz»ÐèÒª³ÌÐò´úÂëÀ´ÏÔʽµØÊÍ·Å¡£Ò»°ãÀ´Ëµ£¬¶ÑµÄÊÇÓÉÀ¬»ø»ØÊÕ
À´¸ºÔðµÄ£¬¾¡¹ÜJVM¹æ·¶²¢²»ÒªÇóÌØÊâµÄÀ¬»ø»ØÊÕ¼¼Êõ£ ......

Äã»á°²×°JavaÂð£¿

java_home
C:\Program Files\Java\jdk1.6.0_16
Path
%java_home%\bin;%java_home%\lib;
classpath
%java_home%\lib\dt.jar;%java_home%\lib\tools.jar;.;
java_home
C:\Program Files\Java\jdk1.6.0_16
Path
%SystemRoot%\system32;%java_home%\bin;%java_home%\lib;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\P ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ