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