当前位置:网站首页>枚举?构造器?面试Demo
枚举?构造器?面试Demo
2022-06-27 08:25:00 【C_x_330】
打印的结果是?
enum AccountType
{
SAVING, FIXED, CURRENT;
private AccountType()
{
System.out.println("It is a account type");
}
}
class EnumOne
{
public static void main(String[]args)
{
System.out.println(AccountType.FIXED);
}
}
枚举类有三个实例,故调用三次构造方法,打印三次It is a account type
边栏推荐
- ServletConfig and ServletContext
- 正确的理解MySQL的MVCC
- Lvgl GUI guide porting code to stm32
- Redis配置文件详解
- Binary tree structure and heap structure foundation
- 冒牌构造函数???
- Creation process and memory layout of objects at JVM level
- Experience record of Luogu's topic brushing
- 游戏资产复用:更快找到所需游戏资产的新方法
- Time function calculation efficiency of C
猜你喜欢
How Oracle converts strings to multiple lines
参考 | Win11 开启热点之后电脑不能上网
MySQL环境变量配置的教程
No matter how good LCD and OLED display technologies are, they cannot replace this ancient display nixie tube
June 26, 2022 (LC 6100 counts the number of ways to place houses)
[10. difference]
JVM common garbage collector
Preliminary understanding of C #
Ready to migrate to the cloud? Please accept this list of migration steps
ServletConfig与ServletContext
随机推荐
第十一章 信号(一)- 概念
Analysis log log
2022 love analysis · panoramic report of it operation and maintenance manufacturers
Etcd tutorial - Chapter 5 etcd etcdctl usage
数据类型占内存大小?LongVsObject
直接修改/etc/crontab 文件内容,定时任务不生效
Understanding mvcc in MySQL transactions is super simple
All tutor information on one page
MySQL索引详解
Refer to | the computer cannot access the Internet after the hotspot is turned on in win11
Five basic types of redis
Rust async: SMOL source code analysis -executor
2022.06.26(LC_6101_判断矩阵是否是一个 X 矩阵)
If xn > 0 and X (n+1) /xn > 1-1/n (n=1,2,...), Prove that the series Σ xn diverges
ACM course term summary
Modify the contents of /etc/crontab file directly, and the scheduled task will not take effect
Persistence mechanism of redis
Filter filter
[daily practice] realization of product card animation effect
若xn>0,且x(n+1)/xn>1-1/n(n=1,2,...),证明级数∑xn发散