当前位置:网站首页>不会初始化类的几种Case
不会初始化类的几种Case
2022-06-27 08:25:00 【C_x_330】
public class P {
public static int abc = 123;
static{
System.out.println("P is init");
}
}
public class S extends P {
static{
System.out.println("S is init");
}
}
public class Test {
public static void main(String[] args) {
System.out.println(S.abc);
}
}P is init<br />123
不会初始化子类的几种
1. 调用的是父类的static方法或者字段
2.调用的是父类的final方法或者字段
3. 通过数组来引用
边栏推荐
- [13. number and bit operation of 1 in binary]
- Mapping of Taobao virtual product store opening tutorial
- 2022.06.26 (LC Luo 6101 Luo determines whether the matrix is an X matrix)
- Rough reading DS transunet: dual swing transformer u-net for medical image segmentation
- MATLAB小技巧(19)矩阵分析--主成分分析
- 0号进程,1号进程,2号进程
- 关联GIS:条条道路通UE5城
- 力扣84柱状图中最大的矩形
- Analysis log log
- 2022.06.26(LC_6100_统计放置房子的方式数)
猜你喜欢
随机推荐
The IPO of Yefeng pharmaceutical was terminated: Yu Feng, the actual controller who had planned to raise 540million yuan, made P2P investment
Redis五种基本类型
lvgl使用demo及说明2
参考 | 升级 Win11 移动热点开不了或者开了连不上
MySQL environment variable configuration tutorial
MATLAB小技巧(19)矩阵分析--主成分分析
Reference | upgrade win11 mobile hotspot can not be opened or connected
What is futures reverse documentary?
Refer to | the computer cannot access the Internet after the hotspot is turned on in win11
June 26, 2022 (LC 6100 counts the number of ways to place houses)
【c ++ primer 笔记】第3章 字符串、向量和数组
正确的理解MySQL的MVCC
Pin details in rust
关联GIS:条条道路通UE5城
Lvgl description 3 about the use of lvgl Guide
SPARQL basic introductory exercise
sql注入之order by注入
[batch dos-cmd command - summary and summary] - how to distinguish the internal command and external command of CMD, and the difference between CMD command and run (win+r) command,
[batch dos-cmd command - summary and summary] - map folder to virtual disk - subst
2022.06.26(LC_6100_统计放置房子的方式数)



![[batch dos-cmd command - summary and summary] - output / display command - echo](/img/44/cddad70eeb756db15c19100c25c61a.png)




