Is it possible in java (or maybe groovy) to ask user for input in console with default value passed? User should be able to edit the default value or commit it by pressing enter key.
<CONSOLE> Enter type: TYPE1<cursor>
if user hits enter key the TYPE1 is passed to application, when user hits backspace the TYPE1 is edited. Any ideas?
Thanks for the response. I already know proposed solution and already used it. The problem is when the user does not want to set particular value. Default is VAL1 but he want this value not to be set for instance. I have no idea how to handle such scenario.
When the value is editable it's easy to both approve or delete it. I also don't imagine to tell user to write null value.