tags:

views:

54

answers:

1

Is there a way to output some text and allow a user to edit and submit as System.in? Obviously System.out.print is not editable...

Eg.

system outputs:

Hallo

user edits to:

Hello

system echos:

Hello
+1  A: 

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).

crazyscot
I don't have any firsthand experience, but googling for "java console library" does give a few potentially promising hits, such as java-console-api (http://code.google.com/p/java-console-api/).
Joe Carnahan