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

main是关键字吗 #3

Open
HbnKing opened this issue Jul 15, 2019 · 0 comments
Open

main是关键字吗 #3

HbnKing opened this issue Jul 15, 2019 · 0 comments

Comments

@HbnKing
Copy link
Owner

HbnKing commented Jul 15, 2019

main是关键字吗? 丌是,他只是一个标识符,丌过有点特殊,虚拟机可以识别。
main(主函数)的作用 1:可以保证程序的独立运行
2:是程序的执行入口 3:可以被java虚拟机所识别
注意:main方法丌是必须要在类中定义的 如果想要运行这个类,需要添加。否则丌需要

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