Java 我如何在 netbeans 中看到输出控制台结果

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/23323170/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-13 21:54:41  来源:igfitidea点击:

how i can see the output console result in netbeans

javanetbeans

提问by user3248000

I am a beginner studying Java using NetBeans. I created my first class and a simple code

我是使用 NetBeans 学习 Java 的初学者。我创建了我的第一堂课和一个简单的代码

public class suju {
    public static void main(String[] args){
        System.out.print("hello word");
    }
}

Why I don't see any result when I click run? I am supposed to see hello worldbut nothing like this is shown.
Only a message BUILD SUCCESSFUL (total time: 0 seconds)

为什么我点击后看不到任何结果run?我应该看到,hello world但没有显示类似的内容。
只有一条消息BUILD SUCCESSFUL (total time: 0 seconds)

Unfortunately I can't post images yet to better present problem I am facing.

不幸的是,我还不能发布图片来更好地呈现我面临的问题。

采纳答案by Salman

Try to right click on the class file on the left panel then choose run option

尝试右键单击左侧面板上的类文件,然后选择运行选项

回答by BecauseWes

Mine was doing the same.

我的也是这样。

I went to java.com and downloaded java again- it then prompted me to uninstall all out-if-date updates.

我去了 java.com 并再次下载了 java - 然后它提示我卸载所有过期更新。

When I ran it again it was working.

当我再次运行它时,它正在工作。