the Test class {public
public static void main (String [] args) {
//System.out.println("hello word1111 ");
// int I = 0;
// = I. 1;
// int K = 10;
/ / I = K;
// S = Short. 9;
// Short S0 =. 11;
// S = S0;
// int RES = I = S = B; //
// in the calculation process, wherein the integer type numbers data operation, he was converted to the corresponding value of the ASCII code and then calculates
// byte B0 = 2;
// int + K C = B0;
//System.out.println(k);
// String STR = "ABC";
// I = int. 1;
// string Str0 = "" 2 + + +. 1. 3;
// when the type of any values and character strings substantially continuous operation (+), the value of the basic types of automatically converted to a string type
//System.out.println(str0);
//System.out.println(3. 4 + + "the Hello");
// Note: when + current operations of some of the columns, if a section contains a string, the string is next to the front, is to begin to see the follow string concatenation
// String str1 = 1 + 3 + +. 5 "a" + + 2. 6;
//System.out.println(str1);
// byte B =. 9;
// int m = B;
above two rows // implicit conversion is normal, automatic
// K =. 7 int;
// byte B0 = (byte) K; // this is cast data types, data type conversion use English small brackets
// int I0 = -3;
//System.out. the println (-i0);
// System.out.println (. 1 + 2);
// when the integer by an integer when the fractional part of the result is discarded, the pictures will not discard the fractional addition
//System.out.println (. 7/2);
// int I = 0;
// int K = I ++;
// int K = I ++;
// increment decrement. Before the variable, after the first calculation value
// after the variable, the dereferencing operator
//System.out.println(k);
//system.out.println(i);
// String STR = "H" + "e" + "llo"; // plus the string is the string concatenation
//System.out.println(str);
//System.out.println(-5% 2);
// char data type of mathematical operations that can be done, when doing the math character ASCII code conversions calculation
//System.out.println('* '+' \ T '+' * ');
// string other types of digital sum is actually converted to the other data strings, the character do splicing string
//System.out.println("* "+ '\ T' + '*');
// I = int. 1;
// Short S = 2;
// I = S; // automatic conversion
/ / s = (short) i; // cast
//
// int I0 = 0;
// int I1 = 0;
// int I2 = 0;
//
// I0 = I1 = I2 =. 1; // = may be continuously assigned
//
// System.out.println (I0 + "," + I1 + "," + I2);
int I =. 1;
// I = I + 2;
I = + 2;
the System.out. println (i);
String str = "he";
str + = "llo"; // + = string is the string concatenation
System.out.println (STR);
Short S = 2;
S = (Short) (S +. 3); // time involved in computing the variable , Java program does not know the specific operation done after this variable will re-check the current variable scope,
// it will be put into a larger variable length, in this example, short integer data is a short , the default will be converted int
S + =. 3; // when using the extended assignment operators, variables will result in automatic calculation participation coerced to the current variable type
}
}
Practice Note eclipse +
Guess you like
Origin www.cnblogs.com/yuanning/p/11953975.html
Recommended
Ranking