java ¼Ì³Ðdzµ
Çë¿´ÏÂÃæÒ»Àý£º
public class TestAbstract {
int count;
public void operation(){
System.out.println("count = " + (++count));
}
}
public class Test extends TestAbstract {
public static void main(String[] args) {
Test test = new Test();
TestAbstract testAb = new TestAbstract();
testAb.operation();
test.operation();
}
}
ÔËÐнá¹ûÈçÏ£º
count = 1
count = 1
ÎÒÃÇÔÙ°Ñ main º¯ÊýÐÞ¸Äһϣº
public static void main(String[] args) {
Test test = new Test();
TestAbstract testAb = new Test ();
testAb.operation();
test.operation();
}ÔËÐнá¹ûÓÖÊÇÔõÑùµÄÄØ£¿
Æäʵ´òÓ¡½á¹ûÒÀÈ»ÊÇ£º
count = 1
count = 1
Ïà¹ØÎĵµ£º
£¨
1
£©
+=
:sum += 1;
Ï൱ÓÚ
sum = sum + 1;
£¨
2
£©
++ --
:i++ i
¼Ó
1, i-- i
¼õ
1, ++
»ò
—
·ÅÔÚÊýÖµºó£¬±íʾִÐÐÔËËãºó¼Ó£¨¼õ£©
1
£¬·´ÕýÊýֵǰ±íʾִÐÐÔËËãÇ°¼Ó£¨¼õ£©
1
£¨
3
£©
?
: :
int n = a<10?1:2
±íʾÈç¹û
a
СÓÚ
10
Ôò
n
µÈÓÚ
1
·ñÔòµÈÓÚ
2
£¨
4
......
ÔÚ9.10ÖпÉÒÔÔÚÖÕ¶ËÖÐʹÓÃapt-getÃüÁî½øÐа²×°¡£ÕâÖÖ·½·¨±È½Ï¼òµ¥¡£²»¹ý¸öÈËÈÏΪ ¶ÔÓÚ³õѧÕߣ¬»¹ÊÇÊÖ¶¯°²×°±È½ÏºÃ£¬¿ÉÒÔÊìϤºÜ¶à¶«Î÷¡£
1.ÏÂÔØjdkºÍjre
µÇ¼sunÍøÕ¾http://java.sun.com/javase/downloads/index.jsp£¬ÏÂÔØjdk-6u18-linux-i586.binºÍjre-6u18-linux-i586.bin¡£×¢ÒâÔÚ¹ÙÍøÖÐ
ÓÐÁ½¸öÏÂÔصØÖ·£¬Ò»¸öÊÇjdk-6u1 ......
javaö¾Ù
ΪʲôҪ¶¨Òåö¾Ù£¿
ÎÊÌ⣺Ҫ¶¨ÒåÐÇÆÚ¼¸»òÐÔ±ðµÄ±äÁ¿£¬¸ÃÔõô¶¨Ò壿¼ÙÉèÓÃ1-7·Ö±ð±íʾÐÇÆÚÒ»µ½ÐÇÆÚÈÕ£¬µ«ÓÐÈË¿ÉÄÜ»áд³Éint weekday = 0;
ö¾Ù¾ÍÊÇÒªÈÃij¸öÀàÐ͵ıäÁ¿µÄÈ¡ÖµÖ»ÄÜΪÈô¸É¸ö¹Ì¶¨ÖµÖеÄÒ»¸ö£¬·ñÔò£¬±àÒëÆ÷¾Í»á±¨´í£¬Ã¶¾Ù¿ÉÒÔÈñàÒëÆ÷ÔÚ±àÒëʱ¾Í¿ÉÒÔ¿ØÖƳÌÐòÖÐÌîдµÄ·Ç·¨Öµ£¬ÆÕͨ±äÁ¿µÄ·½Ê½ÔÚ¿ª·¢½×¶ ......
¶à¼Ì³Ð£º
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 ......