标签:
1
System.out.println(Math.round(10*(Math.sqrt(20)+Math.sqrt(10))/(Math.sqrt(20)-Math.sqrt(10)))/10.0);
double sqrt_20=Math.sqrt(20);
double sqrt_10=Math.sqrt(10);
double result=(sqrt_20+sqrt_10)/(sqrt_20-sqrt_10);
System.out.println(Math.round(result*10)/10.0);
float height= 1.99f;
System.out.println(Byte.MIN_VALUE+"~"+Byte.MAX_VALUE);
System.out.println(Byte.parseByte("108")+10);
System.out.println(Integer.MIN_VALUE+"~"+Integer.MAX_VALUE);
System.out.println(Integer.parseInt("50000")+5);
System.out.println(Integer.toBinaryString(16));
System.out.println(Integer.toHexString(16));
System.out.println(longvalue);
byte b1=125;
byte b2=(byte) (b1+2);
byte b3 = (byte)(125+3);
b3=125+1;
double a = 2.6;
System.out.println(a-2);
int i = 0x1000001;
float ii=i;
System.out.println(Integer.toBinaryString(i)+":"+i);
System.out.println(Integer.toBinaryString((int)ii)+":"+ii);
long i = 0x200000000000001l;
double d = i;
System.out.println(Long.toBinaryString(i)+":"+i);
System.out.println(Long.toBinaryString((long)d)+":"+d);
byte i = 5;
i=(byte)(i+5);
i=5+5;
int a = Integer.parseInt(args[0]);
int b = Integer.parseInt(args[1]);
System.out.println(a+b);
System.out.println(b+b);
Scanner scan=new Scanner(System.in);
System.out.println("姓名:");
String name =scan.next();
System.out.println("性别:");
char sex = scan.next().charAt(0);
System.out.println("年龄:");
int age = scan.nextInt();
System.out.println("身高:");
double height = scan.nextDouble();
System.out.println("性格:");
String type=scan.next();
System.out.println("我的名字是"+name+",我的性别是"+sex+",我的年龄是"+age
+",我的身高是"+height+",我的性格是"+type);
int a =3,b=4;
a = a + b;
b = a - b;
a = a - b;
System.out.println(a+":"+b);
标签:
原文地址:http://www.cnblogs.com/GoFly/p/4707612.html