Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

若程序中需要获取操作系统用户名,应采取下列哪种方法来获取: #67

Open
waylau opened this issue Jul 4, 2020 · 0 comments

Comments

@waylau
Copy link
Owner

waylau commented Jul 4, 2020

若程序中需要获取操作系统用户名,应采取下列哪种方法来获取:(2分)

A. 提示用户输入
B. 由环境变量获取:System.getenv(“USER”)
C. 由JVM属性获取:System.getProperty(“user.name”)
D. 启动程序的时候由程序参数传入

你的回答B 是错误的。估计是C

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant