如何从Netbeans中的System.in(Java)获取输入? [英] How do I get input from System.in (Java) in Netbeans?

查看:205
本文介绍了如何从Netbeans中的System.in(Java)获取输入?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Netbeans中有一个小型Java测试应用程序,其中 main()类从 System.in 读取输入。如何打开一个可以输入输入的窗口? (我在Windows 7上使用NB 6.7.1。)

I have a small Java test app in Netbeans where the main() class reads input from System.in. How can I open a window into which I can type input? (I am using NB 6.7.1 on Windows 7).

推荐答案

可能不是很明显,但在Netbeans的输出选项卡中如果您的主线程正在等待输入,则底部也会输入。只需在最后一个输出行下输入并按Enter键。换句话说,输出选项卡与控制台窗口相同。

It may not be obvious but in Netbeans the Output tab at the bottom also takes input if your main thread is waiting for input. Just type under the last output line and hit enter. In other words, the Output tab is the same as a console window.

这篇关于如何从Netbeans中的System.in(Java)获取输入?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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