简体   繁体   English

输出作为输入流的一部分

[英]output as part of input stream

Is there a way to output some text and allow a user to edit and submit as System.in? 有没有一种方法可以输出一些文本并允许用户以System.in的身份进行编辑和提交? Obviously System.out.print is not editable... 显然System.out.print是不可编辑的...

Eg. 例如。

system outputs: 系统输出:

Hallo

user edits to: 用户编辑为:

Hello

system echos: 系统回显:

Hello

Not directly via System, I don't think. 我不认为不是直接通过系统。 You'll need to interface with the user in some way, either via a GUI or a terminal handling library like curses (if such a thing exists for Java). 您将需要通过GUI或诸如curses之类的终端处理库以某种方式与用户交互(如果Java中存在这种情况)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM