Java ÔËËã·ûÓÅÏȼ¶
ÓÅÏȼ¶
ÔËËã·û
Ãû³Æ
1
( )
À¨ºÅ
2
[ ] , ¡£
ºó׺ÔËËã·û
3
- (Ò»ÔªÔËËã·û£¬È¡¸ºÊý) , ! , ~ , ++ , --
Ò»ÔªÔËËã·û
4
* , / , %
³Ë£¬³ý£¬È¡Ä£
5
+, -
¼Ó£¬¼õ
6
>> , << , >>>
ÒÆλÔËËã·û
7
> , < , >= , <= , instanceof
¹ØϵÔËËã·û
8
==,!=
µÈÓÚ£¬²»µÈÓÚ
9
&
°´Î»Óë
10
^
°´Î»Òì»ò
11
|
°´Î»»ò
12
&&
Âß¼Óë
13
||
Âß¼»ò
14
?:
Ìõ¼þÔËËã·û
15
=£¨°üÀ¨¸÷Óë“=”½áºÏµÄÔËËã·û,ÀýÈ磺+=£©
¸³ÖµÔËËã·û
×ÜżȻÓõ½Óë²Ù×÷·û£¬¾¹ÍüÁËËûµÄÓÅÏȼ¶¡£ Mark һϡ£
Ïà¹ØÎĵµ£º
×òÌì¿´µ½ÕâÑùһƪÌû×Ó£¬ÌÖÂÛÀà¼ÓÔØ˳ÐòµÄ£¬Ò²¿ÉÒÔ˵Êdzõʼ»¯Ë³ÐòµÄ£¬½ñÌìÔçÉÏÕÒ²»µ½ÁË£¬±¾À´Ïë»Ø¸´µÄ£¬ÏÖÔÚ×Ô¼ºÐ´²©¿Í»Ø¸´ÁË£¬ºÇºÇ
public class Singleton {
private static Singleton obj = new Singleton();
public static int counter1 ;
public static int counter2 = 0;& ......
annotations : ×¢ÊÍ
ºÃ´¦
1.Îĵµ±àÖÆ
2.±àÒëÆ÷¼ì²é
3.´úÂë·ÖÎö
JSR 175 ÊDZà³ÌÓïÑÔµÄÔªÊý¾Ý¹¤¾ß,Ϊ½«ÔªÊý¾ÝºÏ²¢µ½ºËÐÄjavaÓïÑÔÖÐÌṩÕýʽÀíÓɺÍ˵Ã÷
»ù±¾ÖªÊ¶:
×¢ÊͲÉÓÃ"@"±ê¼ÇÐÎʽ,ºóÃæÊÇ×¢ÊÍÃû³Æ,È»ºóÔÚÐèÒªÊý¾Ýʱ,ͨ¹ýname=value¶ÔÏò×¢ÊÍÌṩÊý¾Ý
×¢Ê͵ÄÈý¸ö»ù±¾ÖÖÀà:
±ê¼Ç×¢ÊÍ ......
×î½ü¹«Ë¾Òª¿ª·¢Windowsƽ̨ÉϵIJúÆ·£¨ÓÉÓÚÉæ¼°µ½ÉÌÒµ»úÃÜ£¬ËùÒÔÄ¿Ç°ÎÞ·¨¶ÔÕâ¸ö²úÆ·×öÏêϸ½éÉÜ£©£¬²ÉÓÃ.Net¼¼Êõ½øÐпª·¢£¬ÎÒ¸ºÔðµÄÊÇ»ùÓÚ Visual Studio²å¼þ»úÖƵÄÐÐÒµ¿ª·¢¹¤¾ßµÄ¿ª·¢¡£´Ó¿ªÊ¼½Ó´¥.Netµ½ÏÖÔÚÒѾÓнüÈý¸öÔÂÁË£¬¶øÇÒÒ²¿ª·¢³öÁ˵ÚÒ»¸ö°æ±¾£¬¶Ô.NetÒѾÓÐÁËһЩÈÏʶ£¬ÓÉÓÚÒÔÇ°Ö÷ÒªÓÃJava¡¢PythonµÈÓïÑ ......
½Å±¾±äÁ¿ÊÇʹÓà var »ò def ¹Ø¼ü×ÖÉùÃ÷µÄ¡£
¶þÕßÖ®¼äµÄÇø±ðÔÚÓÚ£ºÔڽű¾µÄÕû¸öÉúÃüÖÜÆÚÄÚ¶¼¿ÉÒÔΪ var ±äÁ¿¸³ÓèÐÂÖµ£¬
¶ø def ±äÁ¿ÔÚ±»Ê״θ³ÓèÐÂÖµºó½«±£³Ö²»±ä£»
def numOne = 100;
def numTwo = 2;
var result;
add();
subtract();
multiply();
divide();
function add() {
result = numOne + numTwo; ......