📄 simpleformat.java
字号:
package chapter13;
public class SimpleFormat {
public static void main(String args[]){
int x=2008;
System.out.println("Row 1: "+x+"");
System.out.println("Row 1.1:"+x);
System.out.format("Row 2: %d\n",x);
System.out.printf("Row 3: %d\n",x);
/*
* 类似C语言中的格式化输出
* 而且,format()与printf()类似
*/
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -