import java.util.*;
class Cup{
Cup(int market){
System.out.println("Cup("+market+")");
}
void f(int market){
System.out.println("f("+market+")");
}
}
class Cups{
static Cup cup1;
static Cup cup2;
static {
cup1=new Cup(1);
cup2=new Cup(2);
}
Cups(){
System.out.println("Cups()");
静态块(变量) 创建和初始化
最新推荐文章于 2024-08-26 16:40:46 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)