当前位置:网站首页>枚举?构造器?面试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

边栏推荐
- [daily practice] realization of product card animation effect
- IO管脚配置和pinctrl驱动
- [13. number and bit operation of 1 in binary]
- The 6th Blue Bridge Cup
- SPARQL基础入门练习
- That is, a one-stop live broadcast service with "smooth live broadcast" and full link upgrade
- 第十一章 信号(一)- 概念
- LVGL GUI GUIDER移植代码到STM32
- JS EventListener
- 八大误区,逐个击破(终篇):云难以扩展、定制性差,还会让管理员失去控制权?
猜你喜欢
![[batch dos-cmd command - summary and summary] - output / display command - echo](/img/44/cddad70eeb756db15c19100c25c61a.png)
[batch dos-cmd command - summary and summary] - output / display command - echo

100% understanding of 5 IO models

Redis的事务

【云原生】2.3 Kubernetes 核心实战(上)

MySQL环境变量配置的教程

LVGL GUI GUIDER移植代码到STM32

How Oracle converts strings to multiple lines

Lvgl description 3 about the use of lvgl Guide

Coggle 30 days of ML July competition learning

Preliminary understanding of C #
随机推荐
爬一个网页的所有导师信息
Etcd教程 — 第五章 Etcd之etcdctl的使用
IO管脚配置和pinctrl驱动
(note) Anaconda navigator flashback solution
2022.06.26(LC_6101_判断矩阵是否是一个 X 矩阵)
Rough reading DS transunet: dual swing transformer u-net for medical image segmentation
Refer to | the computer cannot access the Internet after the hotspot is turned on in win11
关于放大器失真的原因你了解多少呢?
DataV轮播表组件dv-scroll-board宽度问题
(原创)自定义Drawable
2022.6.26-----leetcode. seven hundred and ten
ACM course term summary
参考 | Win11 开启热点之后电脑不能上网
Linux下Redis的安装
SPARQL basic introductory exercise
Analysis of key technologies for live broadcast pain points -- second opening, clarity and fluency of the first frame
[batch dos-cmd command - summary and summary] - parameters%0,%1,%2,%[0-9],%0-9 in the batch command and batch command parameter position switching command shift, operator% usage in the DOS command
LVGL GUI GUIDER移植代码到STM32
Install Jenkins
MySQL lock details