“public static void main(String args[])”的 Eclipse 快捷方式是什么?

发布于 2024-12-10 15:12:48 字数 168 浏览 3 评论 0原文

我知道 System.out.println() 的一个很酷的快捷方式:sysout Ctrl + Space

public static void main(String args[]) 有类似的东西吗?

I know a cool shortcut for System.out.println(): sysout Ctrl + Space.

Is there something similar for public static void main(String args[])?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(8

三寸金莲 2024-12-17 15:12:48

这只是 mainCtrl-Space

This is just main and Ctrl-Space.

阪姬 2024-12-17 15:12:48

在 Eclipse 中,选择首选项。

在首选项中,查找 Java/编辑器/模板。

在这里您将看到所有这些的列表。您甚至可以添加自己的。

In Eclipse, select preferences.

In preferences, look for Java/Editor/Templates.

Here you will see a list of all of them. And you can even add your own.

陌生 2024-12-17 15:12:48

只需输入 ma 并按 Ctrl + 空格,您就会看到一个选项。

Just type ma and press Ctrl + Space, you will get an option for it.

独自←快乐 2024-12-17 15:12:48

正如 bmargulies 提到的:

首选项>Java>编辑器>模板>新建...

在此处输入图像描述

在此处输入图像描述

现在,输入 psvm,然后Ctrl + Space< /code> 在 Mac 或 Windows 上。

As bmargulies mentioned:

Preferences>Java>Editor>Templates>New...

enter image description here

enter image description here

Now, type psvm then Ctrl + Space on Mac or Windows.

我爱人 2024-12-17 15:12:48

输入 main 并按住 Ctrl 然后按 Space Space (双倍空格)并选择,或者按输入以关注主选项。

这是最快的方法。

Type main and press and hold Ctrl and next press Space Space (double space) and select, it or pressenter to focus on main option.

This is fastest way.

偏闹i 2024-12-17 15:12:48

在 Eclipse 中获取 public static void main(String[] args) 行,无需
键入整行类型“main”并按 Ctrl + 空格键,然后,您
将获得主方法的选项,选择它。

输入图片此处描述

To get public static void main(String[] args) line in eclipse without
typing the whole line type "main" and press Ctrl + space then, you
will get the option for the main method select it.

enter image description here

给不了的爱 2024-12-17 15:12:48

或者,您可以通过单击一次来启动包含该行的程序。

只需在创建新 Java 类时为其选择方法存根,其中代码显示:

哪个方法存根你想创造吗?

[check-box] public static void main(String[]args) <---- 选择此一项。

[check-box] > 来自超类的构造函数

[check-box] 继承的抽象方法

Alternately, you can start a program containing the line with one click.

Just select the method stub for it when creating the new Java class, where the code says,

Which method stubs would you like to create?

[check-box] public static void main(String[]args) <---- Select this one.

[check-box] Constructors from superclass

[check-box] Inherited abstract methods

呢古 2024-12-17 15:12:48

只需输入 main 并按 Ctrl + Space,您就会看到一个选项。

Just type main and press Ctrl + Space, and you will get an option for it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文