Can anyone show me how to capture a string that is input by a user?
I am coding a simple console (DOS based) interface that needs some user input. For e.g. asking a user to input their name and search an array or link-list for that name.
I know I can use System.in.read() to capture integer but no success in capturing Strings.
Of course I can do that easily in C or C++ but I am confused in what to do in Java.
Thanks in advance,
Darryl
I am coding a simple console (DOS based) interface that needs some user input. For e.g. asking a user to input their name and search an array or link-list for that name.
I know I can use System.in.read() to capture integer but no success in capturing Strings.
Of course I can do that easily in C or C++ but I am confused in what to do in Java.
Thanks in advance,
Darryl