考虑JavaFX Script编程语言的几个小问题

发布于 2024-08-22 07:54:11 字数 272 浏览 1 评论 0原文

我可以传递给整数/数字的最小/最大值是哪些? Integer 在内部使用 java.lang.Integer 吗?如果变量溢出怎么办?它会自动扩展java.lang.Long吗?

在一篇文章中,我读到 def 关键字相当于在 Java 中将变量标记为 Final,但对我来说,它看起来更像是 C 中的 const。JavaFX

有检查异常吗?

遗憾的是,[语言参考][1] 是这样说的:

[待办事项:写章节]

Which are the min/max values I can pass to an Integer/Number? Does Integer use java.lang.Integer internally? And what if the variable overflows? Does it automatically expand java.lang.Long?

In an article I read the def keyword is the equivalent of marking a variable as final in Java but to me, it looks like it's more like const in C.

Does JavaFX have checked exceptions?

Sadly, this is what the [Language Reference][1] says:

[To do: write chapter]

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

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

发布评论

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

评论(1

雨夜星沙 2024-08-29 07:54:11

JavaFX Script 中 Integer、Float、Long 等的最小/最大值与 Java 相同。您可以使用 Integer.MAX_VALUE。 JavaFX 将在内部编译为 Java 等效项。

Def 旨在用于常量或不可变的单例。

JavaFX Script 没有检查异常,但您仍然可以使用 try/catch 块捕获它们。

The min/max values of Integer, Float, Long, etc. in JavaFX Script are the same as Java. You can use Integer.MAX_VALUE. JavaFX will compile down to the Java equivalents internally.

Def is meant to be used for constants or immutable singletons.

JavaFX Script does not have checked exceptions, but you can still catch them with a try/catch block.

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