The Java platform is widely used on mobile phones

Source: Internet
Author: User

Tag: Support Select one of the ble ring ext static Import Main

Because the Java platform is widely used on mobile phones, the game with the extension jar becomes the largest family in the market of mobile games, and can be directly installed directly into the mobile phone.

As we all know, Java is a cross-platform programming language. Due to its high portability, simplicity, reliability, security and many other outstanding performance, it has become one of the most popular and influential programming languages.

The short and lean nature of the Java program and its cross-platform innate features make it the best choice for many open or semi-open mobile phones to expand their capabilities. As a result, most popular mobile phones in the market now support Java applications.

1  Packagecom.table;2 ImportJava.util.Scanner;3 4 //writing a perpetual calendar small program5  Public classthreetable {6 7      Public Static voidMain (string[] args) {8System.out.println ("Please enter the year:");9Scanner Scanner =NewScanner (system.in);Ten         intNyear =scanner.nextint (); OneSystem.out.println ("Please enter the month:"); A         intNmounth =scanner.nextint (); -         intNflag = 0; -         if(nyear% 4 = = 0) the         { -             if(nyear% 100 = = 0) -             { -                 if(nyear% 400 = = 0) +                 { -Nflag = 1; +System.out.println (Nyear + "Year is run year"); A                 } at                 Else -                 { -System.out.println (Nyear + "year is not run year"); -                 } -             } -             Else in             { -Nflag = 1; toSystem.out.println (Nyear + "year is not run year"); +             } -         } the         Else *         { $System.out.println (Nyear + "year is not run year");Panax Notoginseng         } -   the         //determine the number of days in the 2016 month +         if(Nmounth = = 1 A|| Nmounth = = 3 the|| Nmounth = = 5 +|| Nmounth = = 7 -|| Nmounth = = 8 $|| Nmounth = = 10 $|| Nmounth = = 12 ) -         { -System.out.println (Nyear + "year" + Nmounth + "Month is: 31" ); the         } -         Else if(Nmounth = = 4Wuyi|| Nmounth = = 6 the|| Nmounth = = 9 -|| Nmounth = = 11) Wu         { -System.out.println (Nyear + "year" + Nmounth + "Month is: 30" ); About         } $         Else -         { -             if(Nflag = = 0) -             { ASystem.out.println (Nyear + "year" + Nmounth + "Month is: 28" ); +             } the             Else -             { $System.out.println (Nyear + "year" + Nmounth + "Month is: 29" ); the             } the         } the     } the } -  in  

The Java platform is widely used on mobile phones

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.