JAVA平台在手機上廣泛應用

來源:互聯網
上載者:User

標籤:支援   選擇   ble   ring   之一   ext   static   import   main   

JAVA平台由於在手機上廣泛應用,使得副檔名為jar的遊戲成為目前手機遊戲市場上最大的家族,直接傳入手機直接安裝即可。

眾所周知,JAVA是一種跨平台的程式設計語言。由於其高可移植性、簡單、可靠、安全等諸多優異效能,現在已經成為最受歡迎、最有影響力的程式設計語言之一。

JAVA程式的短小精乾和其跨平台的先天特點,使其成為眾多開放或半開放式手機擴充自身功能的最佳選擇。因此現在市場上流行的手機大多支援JAVA應用程式了。

 

 1 package Com.Table; 2 import java.util.Scanner; 3  4 //編寫萬年曆小程式 5 public class ThreeTable { 6  7     public static void main(String[] args) { 8         System.out.println("請輸入年:"); 9         Scanner scanner = new Scanner(System.in);10         int nYear = scanner.nextInt();11         System.out.println("請輸入月:");12         int nMounth = scanner.nextInt();13         int nflag = 0;14         if (nYear % 4 == 0)15         {16             if (nYear % 100 == 0)17             {18                 if (nYear % 400 == 0)19                 {20                     nflag = 1;21                     System.out.println(nYear + "年是潤年");22                 }23                 else24                 {25                     System.out.println(nYear + "年不是潤年");26                 }27             }28             else29             {30                 nflag = 1;31                 System.out.println(nYear + "年不是潤年");32             }33         }34         else35         {36             System.out.println(nYear + "年不是潤年");37         }38  39         //判斷2016年月份的天數40         if (nMounth == 141                 || nMounth == 342                 || nMounth == 543                 || nMounth == 744                 || nMounth == 845                 || nMounth == 1046                 || nMounth == 12 )47         {48             System.out.println(nYear + "年" + nMounth + "月份的天數是:31" );49         }50         else if (nMounth == 451                 || nMounth == 652                 || nMounth == 953                 || nMounth == 11)54         {55             System.out.println(nYear + "年" + nMounth + "月份的天數是:30" );56         }57         else58         {59             if (nflag == 0)60             {61                 System.out.println(nYear + "年" + nMounth + "月份的天數是:28" );62             }63             else64             {65                 System.out.println(nYear + "年" + nMounth + "月份的天數是:29" );66             }67         }68     }69 }70 71  

 

JAVA平台在手機上廣泛應用

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.