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

Java enum ö¾ÙÀàÐÍ

Java enum ö¾ÙÀàÐÍ
ö¾ÙÀàÐÍÊÇÒ»¸ö³£Á¿¼¯ºÏµÄÊý¾ÝÀàÐÍ¡£
ÒòΪ¶¼Êdz£Á¿£¬ËùÒÔÒ»¸öö¾ÙÀàÐÍÖеÄ×Ö¶ÎÃû¶¼Òª´óд¡£
ÔÚJAVAÖУ¬Ã¶¾ÙÀàÐ͵Ķ¨ÒåÊÇͨ¹ý“enum“¹Ø¼ü×Ö½øÐеġ£ÀýÈçÄãÒª¶¨Òå
Ò»¸ö±íʾһ¸öÐÇÆÚµÄÿһÌìµÄö¾ÙÀàÐÍ£º
public enum Day {
  SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY,
  SATURDAY
}
Ç¿ÁÒ½¨Òéµ±ÄãÐèÒª¶¨ÒåÒ»×é³£Á¿Ê±£¬Ê¹ÓÃö¾ÙÀàÐÍ¡£
ÏÂÃæÎÒÃÇÀ´¿´ÔõÑùʹÓÃÉÏÃ涨ÒåµÄÀàÐÍDay£º
public class EnumTest {
  Day day;
 
  public EnumTest(Day day){
    this.day = day;
  }
 
  public void tellItLikeItIs(){
    switch(day){
      case MONDAY: System.out.println("Mondays are bad."); break;
      case FRIDAY: System.out.println("Fridays are better"); break;
      case SATURDAY:
      case SUNDAY: System.out.println("Weekends are best"); break;
      default: System.out.println("Midweek days are so-so.")
    }
  }
 
  public static void main(String[] args){
    EnumTest firstDay = new EnumTest(Day.MONDAY);
    firstDay.tellItLikeItIs();
    EnumTest thirdDay = new EnumTest(Day.WEDNESDAY);
        thirdDay.tellItLikeItIs();
        EnumTest fifthDay = new EnumTest(Day.FRIDAY);
        fifthDay.tellItLikeItIs();
        EnumTest sixthDay = new EnumTest(Day.SATURDAY);
        sixthDay.tellItLikeItIs();
        EnumTest seventhDay = new EnumTest(Day.SUNDAY);
        seventhDay.tellItLikeItIs();
  }
}
Êä³ö£º
Mondays are bad.
Midweek days are so-so.
Fridays are better.
Weekends are best.
Weekends are best.
JAVAÖе


Ïà¹ØÎĵµ£º

ÓйØjavaÖеÄÒýÓÃÎÊÌâ

Ê×ÏÈ£¬java¶Ô¶ÔÏóºÍ»ù±¾ÀàÐ͵Ĵ¦ÀíÊDz»Ò»ÑùµÄ£¬ºÍCÓïÑÔÒ»Ñù£¬µ±°ÑJavaµÄ»ù±¾Êý¾ÝÀàÐÍ£¨Èçint£¬char£¬doubleµÈ£©×÷ΪÈë¿Ú²ÎÊý´«¸øº¯ÊýÌåµÄʱºò£¬´«ÈëµÄ²ÎÊýÔÚº¯ÊýÌåÄÚ²¿±ä³ÉÁ˾ֲ¿±äÁ¿£¬Õâ¸ö¾Ö²¿±äÁ¿ÊÇÊäÈë²ÎÊýµÄÒ»¸ö¿½±´£¬ËùÓеĺ¯ÊýÌåÄÚ²¿µÄ²Ù×÷¶¼ÊÇÕë¶ÔÕâ¸ö¿½±´µÄ²Ù×÷£¬º¯ÊýÖ´ÐнáÊøºó£¬Õâ¸ö¾Ö²¿±äÁ¿Ò²¾ÍÍê³ÉÁËËüµÄʹÃü£¬ ......

java¶ÁÈ¡mp3Îļþ

java¶ÁÈ¡mp3Îļþ ÊÕ²Ø
JMFʵ¼ÊÉÏÊÇJavaµÄÒ»¸öÀà°ü¡£JMF 2.1.1¼¼ÊõÌṩÁËÏȽøµÄýÌå´¦ÀíÄÜÁ¦£¬´Ó¶øÀ©Õ¹ÁËJavaƽ̨µÄ¹¦ÄÜ¡£ÕâЩ¹¦ÄÜ°üÀ¨£ºÃ½Ì岶»ñ¡¢Ñ¹Ëõ¡¢Á÷ת¡¢»Ø·Å£¬ÒÔ¼°¶Ô¸÷ÖÖÖ÷ҪýÌåÐÎʽºÍ±àÂëµÄÖ§³Ö£¬ÈçM-JPEG¡¢H.263¡¢MP3¡¢RTP/RTSP (ʵʱ´«ËÍЭÒéºÍʵʱÁ÷תЭÒé)¡¢Macromedias Flash¡¢IBMµÄHotMediaºÍBeatniksµÄRi ......

WindowsÏÂJAVAºÍANTºÍSDK»·¾³±äÁ¿ÉèÖÃ

ÒÔÏÂÉèÖÃWinXP¼°ÒÔÉÏÓû§£¬ÓÒ¼üµã»÷ÎҵĵçÄÔ->ÊôÐÔ->¸ß¼¶->»·¾³±äÁ¿£¬ÉèÖü´¿É¡£ÉèÖÃÍê³ÉºóÐèÖØÐÂÆô¶¯ÃüÁîÌáʾ·û²ÅÄÜÉúЧ¡£¾ßÌåÈçÏ£º
JAVA»·¾³±äÁ¿ÉèÖÃ
WindowsÏÂJAVAÓõ½µÄ»·¾³±äÁ¿Ö÷ÒªÓÐ3¸ö£¬JAVA_HOME¡¢CLASSPATH¡¢PATH¡£
JAVA_HOMEÖ¸ÏòµÄÊÇJDKµÄ°²×°Â·¾¶£¬ÈçD:\Program Files\IBM\Java50£¬ÔÚÕâ·¾¶ÏÂÄãÓ¦¸ÃÄܹ»Õ ......

javaÁ´½Ósql server

Ô­Ìû¼°ÌÖÂÛ£ºhttp://bbs.bc-cn.net/dispbbs.asp?boardid=12&id=140292
*   ×î½üÒòΪ¿ª·¢»î¶¯ÐèÒª,ÓÃÉÏÁËEclipse,²¢ÒªÇóʹÓþ«¼ò°æµÄSQLÊý¾Ý¿â(¼´SQL   Server   2005)À´½øÐпª·¢ÏîÄ¿   *
1.×¼±¸¹¤×÷:   ×¼±¸Ïà¹ØµÄÈí¼þ(Eclipse³ýÍâ,¿ªÔ´Èí¼þ¿ÉÒÔ´Ó¹ÙÍøÏÂÔØ)
<1> .Microsoft   ......

Java¶àÏ̱߳à³ÌÏê½â

Ò»£ºÀí½â¶àÏß³Ì
¶àÏß³ÌÊÇÕâÑùÒ»ÖÖ»úÖÆ£¬ËüÔÊÐíÔÚ³ÌÐòÖв¢·¢Ö´Ðжà¸öÖ¸ÁîÁ÷£¬Ã¿¸öÖ¸ÁîÁ÷¶¼³ÆΪһ¸öỊ̈߳¬±Ë´Ë¼ä»¥Ïà¶ÀÁ¢¡£
Ïß³ÌÓÖ³ÆΪÇáÁ¿¼¶½ø³Ì£¬ËüºÍ½ø³ÌÒ»ÑùÓµÓжÀÁ¢µÄÖ´ÐпØÖÆ£¬ÓɲÙ×÷ϵͳ¸ºÔðµ÷¶È£¬Çø±ðÔÚÓÚÏß³ÌûÓжÀÁ¢µÄ´æ´¢¿Õ¼ä£¬¶øÊǺÍËùÊô½ø³ÌÖеÄÆäËüÏ̹߳²ÏíÒ»¸ö´æ´¢¿Õ¼ä£¬ÕâʹµÃÏ̼߳äµÄͨÐÅÔ¶½Ï½ø³Ì¼òµ¥¡£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ