Web-android Engineer first form the assignment operator in -3-3 Java

Source: Internet
Author: User

Source: http://www.imooc.com/code/1298

An assignment operator is a symbol that specifies a numeric value for a variable or constant. If you can use "=" to assign the result of the right expression to the left operand.

Common assignment operators supported by Java, as shown in the following table:

Task

Let's hurry up and do a practice, pro ...

Write code in an empty space in the editor, and apply the assignment operator to achieve the following results:

1  Public classhelloworld{2      Public Static voidMain (string[] args) {3         intone = 10 ;4         intboth = 20 ;5         intthree = 0 ;6three = one +both ;7System.out.println ("three = one + both ==>" +three);8Three + =One ;9System.out.println ("three + = one ==>" +three);TenThree-=One ; OneSystem.out.println ("Three-= one ==>" +three); AThree *=One ; -System.out.println ("Three *= one ==>" +three); -Three/=One ; theSystem.out.println ("Three/= one ==>" +three); -Three%=One ; -System.out.println ("Three%= one ==>" +three); -     } +}

Web-android Engineer first form the assignment operator in -3-3 Java

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.