JavaÓëC++µÄÇø±ð
JavaÓëC++×î´óµÄ²»Í¬µÄ£¬JavaÍêÈ«ÊÇÃæÏò¶ÔÏóµÄ£¬ÊÇÓÉÀ๹³ÉµÄ£¬¶øC++ÊÇÓɶÔÏóÓë¹ý³Ì×é³É¡£
1¡¢Â·¾¶£º
Java°üÀ¨Ò»¸ö°üpackage,C++ûÓУ»
2¡¢ÒýÈëÀà
java import.*.*; C++ include ""';
3¡¢Ô¤¶¨Ò壬
C++°üÀ¨Ô¤¶¨Ò壬Java²»°üÀ¨
4¡¢½á¹¹
C++°üÀ¨½á¹¹£¬JavaÖ»°üÀ¨À࣬½á¹¹Ìå¿ÉÒÔת»¯ÎªÀà¡£
5¡¢ÀàÃûÓëÎļþÃû
Java±ØÐëÓÐÒ»¸öÀàÃûÓëÎļþÃûÏàͬ£¬C++²»±Ø£¬C++°üÀ¨¶¨ÒåÓë˵Ã÷Îļþ£»
6¡¢main
JavaÖУ¬main°üÀ¨ÔÚÖ÷ÀàÖУ¬ÓÃstatic˵Ã÷£¬C++µ¥¶À
8¡¢·ÃÎÊ¿ØÖÆ
JavaÖÐÿ¸ö³ÉÔ±±äÁ¿Óë·½·¨Ó÷ÃÎÊ¿ØÖÆ×¢Ã÷£¬¶øC++¿ÉÒÔ¼¸¸ö³ÉÔ±±äÁ¿»ò·½·¨Ò»Æð×¢Ã÷£»
9¡¢¼Ì³Ð
JavaÓÃextends¼Ì³Ð£¬C++ÓÃ×ÓÀà:·½ÎÊ¿ØÖÆ ¸¸Àà
10¡¢ÊäÈëÊä³ö
C++ cin\ print\cout Java BufferReader bf=new BufferReader(InputStreamReader(System.in);
Integer.parseInt(bf.readLine);
System.out.println("The result you entered is:");
Ïà¹ØÎĵµ£º
ËãÊõÒì³£ÀࣺArithmeticExecption
¿ÕÖ¸ÕëÒì³£ÀࣺNullPointerException
ÀàÐÍÇ¿ÖÆת»»Òì³££ºClassCastException
Êý×鸺ϱêÒì³££ºNegativeArrayException
Êý×éϱêÔ½½çÒì³££ºArrayIndexOutOfBoundsException
Î¥±³°²È«ÔÔòÒì³££ºSecturityException
ÎļþÒѽáÊøÒì³££ºEOFException
ÎļþδÕÒµ½Òì³££ºFileNotFound ......
Ò»¡¢Í¬²½ÎÊÌâÌá³ö
Ï̵߳Äͬ²½ÊÇΪÁË·ÀÖ¹¶à¸öÏ̷߳ÃÎÊÒ»¸öÊý¾Ý¶ÔÏóʱ£¬¶ÔÊý¾ÝÔì³ÉµÄÆÆ»µ¡£
ÀýÈ磺Á½¸öÏß³ÌThreadA¡¢ThreadB¶¼²Ù×÷ͬһ¸ö¶ÔÏóFoo¶ÔÏ󣬲¢ÐÞ¸ÄFoo¶ÔÏóÉϵÄÊý¾Ý¡£
public
class
Foo {
private
int
x = 100;
public
int
get ......
Ò»¡¢ÃæÏò¶ÔÏóµÄÌØÕ÷ÓÐÄÄЩ·½Ãæ
1.³éÏó£º
³éÏó¾ÍÊǺöÂÔÒ»¸öÖ÷ÌâÖÐÓ뵱ǰĿ±êÎ޹صÄÄÇЩ·½Ã棬ÒÔ±ã¸ü³ä·ÖµØ×¢ÒâÓ뵱ǰĿ±êÓйصķ½Ãæ¡£³éÏó²¢²»´òËãÁ˽âÈ«²¿ÎÊÌ⣬¶øÖ»ÊÇÑ¡ÔñÆäÖеÄÒ»²¿·Ö£¬ÔÝʱ²»Óò¿·Öϸ½Ú¡£³éÏó°üÀ¨Á½¸ö·½Ã棬һÊǹý³Ì³éÏ󣬶þÊÇÊý¾Ý³éÏó¡£
......
±¾ÎÄתÔØ×ÔÀîÐ÷³ÉÀÏʦµÄ±Ê¼Ç£¬¸ÐлÀîÀÏʦ£¡
WebÓ¦ÓÃÖбØÐëÔÚ¿Í»§¶Ë¶ÔÊäÈëÐÅÏ¢½øÐÐÑéÖ¤£¬Èç¹û·¢ÏÖ´íÎó¿ÉÒÔ¼°Ê±¶ÔÓû§½øÐз´À¡£¬Ò²²»Óõȵ½·þÎñÆ÷·¢ÏÖÖ®ºóÔÙ·´À¡£¬Ò»·½ÃæÊǼõÉÙÁËÓû§µÄµÈ´ýʱ¼ä£¬ÁíÒ»·½Ãæ¼õÉÙ²»±ØÒªµÄ½»»¥¹ý³Ì¡£±¾½ÚÄÚÈݽéÉÜÈçºÎʹÓÃJavaScriptÍê³É¿Í»§¶ËµÄÑéÖ¤¡£
JavaScriptÓïÑÔ
ÔÚWebÓ¦ÓÃÖÐÐèÒªÔÚ¿Í»§¶Ë ......
Java AppletÓëJava ApplicationµÄÇø±ð
ÔÚJavaÓïÑÔÖУ¬Äܹ»¶ÀÁ¢ÔËÐеijÌÐò³ÆΪJavaÓ¦ÓóÌÐò£¨Application£©¡£JavaÓïÑÔ»¹ÓÐÁíÍâÒ»ÖÖ³ÌÐò——Applet³ÌÐò¡£Applet³ÌÐò£¨Ò²³ÆJavaС³ÌÐò£©ÊÇÔËÐÐÓÚ¸÷ÖÖÍøÒ³ÎļþÖУ¬ÓÃÓÚÔöÇ¿ÍøÒ³µÄÈË»ú½»»¥¡¢¶¯»ÏÔʾ¡¢ÉùÒô²¥·ÅµÈ¹¦ÄܵijÌÐò¡£
Java Appletº ......