📄 four.java
字号:
public class four {
static int count=0;
final int i=5;
int petalCount = 0;
String s = new String("null");
Flower(String s, int petals) {
petalCount = petals;
this.s = s; //
System.out.println("String & int args");
}
Flower() {
this("hi", 47);
System.out.println("default constructor (no args)");
count++;
}
void print() {
System.out.println("petalCount = " + petalCount + " s = "+ s +" count="+count +"i ="+i);
}
public static void main(String[] args) {
Flower x = new Flower();
x.print();
Flower y = new Flower();
y.print();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -