JavaÖеÄö¾ÙÀàÐÍ£¬enum
public class MyEnumTestMain {
public enum MyenumTest{red,blue,green,black}//¶¨Òåö¾ÙÀàÐÍ
public static void main(String[] args) {
MyenumTest mt = MyenumTest.red;//redÏ൱ÓÚö¾ÙµÄ¾²Ì¬ÊôÐÔ
switch(mt){
case red:
System.out.println("red");
break;
case blue:
System.out.println("blue");
break;
default:
System.out.println("ÆäËû");
}
}
}
Ïà¹ØÎĵµ£º
Java¿ª·¢Æ½Ì¨µÄÖÖÀàºÜ¶à£¬ÔÚÕâÆªÎÄÕÂÖÐÎÒÖ÷ÒªÒÔJ2SEΪÀý×Ó¡£J2SE¼¸ºõÊÇ¿ª·¢ËùÓÐJavaÓ¦ÓóÌÐòµÄ±Ø±¸¡£ËüÖ÷ÒªÊÇÓÉÒ»¸öcompiler(±àÒëÆ÷)£¬Ò»¸öÔËÐл·¾³(runtime environment),ºÍÒ»¸öºËÐĵÄAPIËù¹¹³É¡£ÎÒÃÇÒªÔÙ´ÎҪǿµ÷µÄÊÇ£¬ÄúËù±àдӦÓóÌÐò²¢²»ÊÇÖ±½ÓÔÚÄúµÄ±¾µØ²Ù×÷ϵͳÉÏÖ´ÐÐµÄ ......
ÔËÓüÓÃܼ¼Êõ±£»¤JavaÔ´´úÂë
java
³ÌÐòµÄÔ´´úÂëºÜÈÝÒ×±»±ðÈË͵¿´¡£Ö»ÒªÓÐÒ»¸ö·´±àÒëÆ÷£¬ÈκÎÈ˶¼¿ÉÒÔ·ÖÎö±ðÈ˵ĴúÂë¡£±¾ÎÄÌÖÂÛÈçºÎÔÚ²»ÐÞ¸ÄÔÓгÌÐòµÄÇé
¿öÏ£¬Í¨¹ý
¼ÓÃÜ
¼¼Êõ±£»¤Ô´´ú
Âë¡£
¡¡¡¡Ò»¡¢ÎªÊ²Ã´Òª
¼ÓÃÜ
£¿
¡¡ ......
2008-04-26 09:25 ×÷Õߣºsuperman À´Ô´£ºÈüµÏÍø
[ÕªÒª] Ê×ÏÈ£¬±¾ÎĵÄÄ¿±ê¶ÁÕßÊÇÕýÔÚ´Óʼ¼Êõ¹¤×÷µÄ¼Ü¹¹Ê¦¡£±ÜÃâ½²ÊöһЩ³Â¸¯µÄ×î¼Ñʵ¼ù£¬ÀýÈç"ÈÕ³£¹¹½¨£¨build daily£©"¡¢"²âÊÔÒ»ÇУ¨test everything£©"ºÍ"¾³£¼¯³É£¨ integrate often£©¡£ ÈκξßÓгÆÖ°¼Ü¹¹Ê¦µÄÏîÄ¿¶¼Óзֹ¤Ã÷È·µÄ¡¢¶¨ÒåÁ¼ºÃµÄÍŶӽṹ¡£ËûÃÇ»¹Îª½øÐбà ......
ÒÔǰ¶¼ÊÇÓÃÒ»°ãµÄsocket±à³Ì£¬ÓÃÏß³ÌÀ´¿ØÖÆ¡£×î½üͻȻÓÃnioÀ´×öЩ¶«Î÷¡£
nioµÄºÃ´¦ÎÒÀ´ËµÒ»Ï£ºµÚÒ»£¬¶Áд¶¼ÊÇ»ùÓÚ¿éµÄ£¬Ð§Âʸߡ£µÚ¶þ£¬Í¨¹ýÒýÈëselector,¼ò»¯ÁËÍøÂç±à³ÌÄ£ÐÍ£¬Òì²½·Ç×èÈû¡£
¼ÈÈ»ÓÐÕâô¶àºÃ´¦£¬ÄǾÍд¸öNIO TCPÍøÂçÁÄÌìÊÒÀ´Á·Á·ÊÖ°É¡£
ÒòΪûÓÐдgui£¬ÊÇ»ùÓÚ¿ØÖÆÌ¨µÄËùÒÔûд˽Á˵IJ¿·Ö£¬Ö»Ð´Á˹«¹²ÁÄÌìÊ ......