package Number;标签:基本,java,int,数据类型,System,boolean,println,c1,out From: https://blog.51cto.com/u_15826214/5750142
public class Frist {
static String s1 = "你好";
static final double PI = 3.14;
// int m = 123;
public static void main(String[] args) {
String s2 = "Java";
System.out.println(s1);
System.out.println(s2);
byte mybyte = 124;
short myshort = 32564;
int myint = 4578612;
long mylong = 46789451;
long result = mybyte + myshort + myint + mylong;
System.out.println(result);
float f1 = 3.14f;
double d1 = 456.12d;
double d2 = 456.12;
// float f2 = 3.14;必须有f结尾
char word = 'd', word2 = '@';
int p = 23045, p2 = 45213;
System.out.println((int)word);
System.out.println((int)word2);
System.out.println((char)p);
System.out.println((char)p2);
boolean b;
boolean b1, b2;
boolean b3 = true;
System.out.println(b3);
int $a = 1;
int ¥a = 2;
int 啊 = 3;
System.out.println($a);
System.out.println(¥a);
System.out.println(啊);
final int number;
// number = 12345;
System.out.println(PI);
System.out.println(number=1234);
// System.out.println(m);
int a1 = 4;
int b11;
b11 = ++a1;//用之前+1
System.out.println(a1);
System.out.println(b11);
int c1,d11;
c1 = 4;
d11 = c1++;//用之后+1
System.out.println(c1);
System.out.println(d11);
System.out.println(c1>d11);
boolean b224 = 20 > 24 ? true : false;
System.out.println(b224);
}
}