[英]How do you get Eclipse to auto-generate a main method for a new Java class?
Does anyone know a reason why my Eclipse does not preload 有谁知道我的Eclipse没有预加载的原因
public static void main(String[] args)
when I create a new class? 当我创建一个新类? What can I do to make it appear automatically?
我该怎么做才能让它自动出现?
Type main
and press ctrl + space . 键入
main
并按ctrl + space 。 The eclipse content assist will pop up with main method. eclipse内容辅助将弹出main方法。 Press enter .
按enter键 。
"what can i do to make it appear automatically? "
“我能做些什么让它自动出现?”
public static void main(String[] args)
public static void main(String[] args)
I think the best practise is to use only keyboard. 我认为最好的做法是只使用键盘。 It makes workflow a lot faster.
它使工作流程更快。
Ctrl+n
Ctrl+n
创建新的java类 (left)Alt+v
to easily tick checkbox for - public static void main(String[] args)
(left)Alt+v
轻松勾选复选框 - public static void main(String[] args)
[enter]
Finish and voila class is ready... [enter]
完成并且瞧瞧类准备好了......
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.