Java program operator exercises

Source: Internet
Author: User

 Public classOK { Public Static voidMain (string[] args) {System.out.println ("OK"); intOK = 123;                System.out.println (OK); System.out.println ("B =" +OK); System.out.println ("z =" + ok++); System.out.println ("Z =" + + +OK); System.out.println ("z =" + ok--); System.out.println ("Z =" +--OK); intA = + +OK; System.out.println ("Z =" +a); intm = 1, n = 2, o = 3, p = 4; System.out.println ("OK =" + ((m + N) *o/(P-o) +p)); System.out.println ("OK =" + (m + N) *o/(P-o) +p); System.out.println ("OK =" + p%N); System.out.println ("OK =" + (M >N)); System.out.println ("OK =" + (p >=p)); System.out.println ("OK =" + (P! =p)); System.out.println ("OK =" + ((P > m) && (P <m)); System.out.println ("OK =" + ((P > m) | | (P <m)); BooleanOK = (P! = p) && (n <o);                System.out.println (OK); BooleanOk = (P! = P) | | (N <o);                        System.out.println (OK); //p *= OK;System.out.println (P); SYSTEM.OUT.PRINTLN (P*OK); System.out.println ("p =" + p *OK); System.out.println ("p =" + p * OK + 1 ); SYSTEM.OUT.PRINTLN (P* OK + 1 ); String JJ= p > M? "Yes": "No";                                System.out.println (JJ); String GG= "Girl", bb = "Boy"; if(M >N) {System.out.println (GG);} ElseSystem.out.println (BB); String GG= m > n? " Girl ":" Boy "; System.out.println (GG);

The output is:

Ok
123
b = 123
z = 123
z = 125
z = 125
z = 123
z = 124
OK = 13
OK = 94
OK = 0
OK = False
OK = True
OK = False
OK = False
OK = True
False
True
4
496
P =496
P =4961
497
Yes
Boy
Boy

Java program operator exercises

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.