class 不是 "main" class 的通用名称是什么?

What is the generic name for classes that are not the "main" class?

"main" class 标记程序的入口点,通常在其主要方法中实例化其他 classes。是否有 class 不是 "main" class 的通用名称?

我是 Java 的新手,我想了解更多关于它的术语,但无法在任何地方找到这些信息。

The "main" class marks the entry point of the program, often instantiating other classes in its main method. Is there a generic name for the classes that are not the "main" class?

没有标准"main"class。或非主。只有 classes.

可能有一些 classes 的方法带有签名 public static void main(String[] args)。 这些 class 可以在命令行上使用 java package.TheClassName 执行,或者可以是在可执行文件 jar 中声明的指定主 class。 一个项目中经常有这样一个class, 但是你想要多少就可以多少。 这些 classes 没有标准命名。 (我称他们为 运行ners。)

包作者必须明确记录这些 class 的包和名称,以便用户可以 运行 它们,因为没有标准的方法来猜测它们。 或者提供 运行ner 脚本或可执行 jar 来封装名称(和参数)的详细信息。 无论哪种方式,执行方法都必须始终记录在案,因为它并不明显。

I'm new to Java, and I'm trying to learn more about its terminology and haven't been able to find this information anywhere.

那是因为找不到任何东西。

对于不是入口点 class 的 class,没有可识别的术语。它不是一个需要1特定术语的概念。这就是为什么你找不到。

打个比方:对于所有不是 pandas 的动物,都没有公认的科学术语。


解决方案:

  • 将这样的class称为"a non-main class",人们就会明白你的意思2.
  • 使用形式逻辑/数学符号。数百年来,数学家们已经能够清楚/简洁地表达自己:-)

1 - 也就是说,这个概念在非正式话语/对话中出现的频率不够高,不足以保证有人为它提出建议。

2 - 换句话说,即兴创作。就像您在尝试描述一些您不认识的其他概念时所做的那样。