Linux operational Systems Engineer and Java Basic Learning series-2

Source: Internet
Author: User
Tags arithmetic operators

Java Natural Pride Series-2

Operator

1. Arithmetic Operators

Note :

1 ) "+" number is used as a string connector in addition to the addition operation;

2 ) string data and any data usage + are all connected and eventually become strings.

package day4javatest.myeclipse;

Public class Day4test1 {

               /**

                * @param args

*/

publicstaticvoid Main (String[]args) {

// TODO auto-generated method Stub

//int x=18;

//int y=9;

//int z;

//z=x+y;

//system.out.print (20%4);

//int a=3,b;

               //b=a++;

               System. out "hello" + "world!" + " child "

//system.out.println (a);

}

}

Operation Result: helloworld! Child Children

Supplemental: Escape character

escape character: by \ to change the meaning of the letter or symbol behind it.

\ n: line Break

To be Continued ...


This article is from the "Empty Valley Orchid" blog, please be sure to keep this source http://2489843.blog.51cto.com/2479843/1539026

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.