用Java绘制Hello World的最快方法是什么 [英] What's the fastest way to draw a Hello World in Java

查看:70
本文介绍了用Java绘制Hello World的最快方法是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Java中的GUI在屏幕上绘制Hello World的最快方式是什么:

What's the fastest way to draw a Hello World on the screen using a GUI in Java:

1-通过使用最少的类数.

1- by using the minimum number of classes.

2-执行了最少的字节码

2- with the least byte code executed

3- JVM调整

因此,当我双击Windows中的Jar文件时,Hello World会立即出现(假定尚未加载运行时).

so when I double click on the Jar file in Windows, the Hello World appears in no time (assuming the Runtime is not already loaded).

推荐答案

这是我可以获得的最快的图形Hello世界.

this is the fastest graphical Hello world i could get.

public class HelloWorld{
    public static void main(String[] args) {
        javax.swing.JOptionPane.showMessageDialog(null, "Hello World");
    }
}

这篇关于用Java绘制Hello World的最快方法是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆