📄 systemoutput.java
字号:
public class SystemOutput
{ public static void main(String args[])
{ short aShort = 1;
int anInt = 123;
long aLong = 123456L;
float aFloat = 123F;
double pi = Math.PI,e = Math.E;
char cc = 'B';
boolean okay = false;
System.out.println("Decimal numbers:");
System.out.println("\t double value: " + pi + " (pi)");
System.out.println("\t double value: " + e + " (Euler's number)");
System.out.println("\t float value: " + aFloat);
System.out.println("\t large double value: " + Math.exp(120.0));
System.out.println("Integer numbers:");
System.out.print("\t int is " + anInt);
System.out.print(", short is " + aShort);
System.out.println(", and a long is " + aLong);
System.out.println("Other types:");
System.out.println("\t character = " + cc + ", boolean = " + okay);
System.out.println("Computations:");
System.out.println("\t square root of 2 = " + Math.sqrt(2.0));
System.out.println("\t cos(e + Pi) = " + Math.cos(e + pi));
System.out.flush();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -