Java 9.25

Source: Internet
Author: User

Import Java.util.scanner;public class Test {public static void main (string[] args) {System.out.println ("5+5="        + 5 + 5);        int a = 3,b;        b = a++;        System.out.println ("a=" + A + ", b=" + b);        int a1 = 3,B1;        B1 = ++a1;        System.out.println ("a=" + A + ", b=" + b);        Short S = 3;        s = (short) (S + (short) 4);        System.out.println ("s=" + s);        System.out.println (6 & 3);        System.out.println (6 | 3);        System.out.println (6 ^ 3);        SYSTEM.OUT.PRINTLN (3 << 2);        SYSTEM.OUT.PRINTLN (3 >> 1);        int x = 0,y; y = x > 1?        100:200;                System.out.println ("y=" + y);        Scanner hy = new Scanner (system.in);        int h,h1;        System.out.println ("Please enter two integers in turn");        h = new Integer (Hy.nextline ());        int AAA = Hy.nextint ();        System.out.println ("Please enter a second integer");        H1 = new Integer (Hy.nextline ()); int temp = h > h1?        H:H1; System.out.println (TeMP);        System.out.println ("Please enter three integers in turn");        int k,k1,k2,temp1,temp2;        K = new Integer (Hy.nextline ());        K1 = new Integer (Hy.nextline ());        K2 = new Integer (Hy.nextline ()); Temp1 = k > K1?        K:K1; Temp2 = temp1 > K2?        TEMP1:K2;                        System.out.println (TEMP2);        SYSTEM.OUT.PRINTLN ("Input number 1-12");        int month;        month = new Integer (Hy.nextline ());        if (month >= 3 && month <= 5) {System.out.println ("Spring");        }else if (month >= 6 && month <= 8) {System.out.println ("Summer");        }else if (month >= 9 && month <=) {System.out.println ("Autumn");        }else if (month >= && month <= 2) {System.out.println ("Winter"); }else {System.out.println ("wrong input!                ");}        SYSTEM.OUT.PRINTLN ("Input number 1-12");        int month1;        Month1 = new Integer (Hy.nextline ()); Switch (month1) {case ' 3 ': Case ' 4 ': Case ' 5 ': System.out.println ("Spring");        Break            Case ' 6 ': Case ' 7 ': Case ' 8 ': System.out.println ("Summer");        Break            Case ' 9 ': Case ': Case ' one ': System.out.println ("Autumn");        Break            Case ' n ': Case ' 1 ': Case ' 2 ': System.out.println ("Winter");        Break DEFAULT:SYSTEM.OUT.PRINTLN ("Wrong input!            ");        Break        } int v = 1;            do {System.out.println ("v=" + V);        v++;                }while (v < 1);        int m = 1;            while (M < 1) {System.out.println ("m=" + M);        m++;         } int g = 1; For (System.out.println ("a"); G < 3;        System.out.println ("C")) System.out.println ("D") g++;    System.out.println (g); }}

Java 9.25

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.