I am new to Java programming and am converting a program I wrote in C++ to Java. It is a currency conversion program that uses a number of functions to display different menus. It also allows for user input of the menu options to either do a currency conversion or transfer to a different menu which is in a different function.
My question is, I am just getting started and can not find a Java equivalent to C++'s scanf command. I want to use it to read in a string array (for the menu option). My menu option consists of a single letter and a two digit number. By having the menu option defined as an array, I can convert the first letter portion to upper case if the user accidentally enters it in lower case. Then, the number portion can be validated as being a range of valid numbers.
Once I have selected the appropriate menu option to do a conversion, I ask the user to enter a currency amount, defined as a double to be converted to the new currency. Is the same operation code that is used for the menu option able to support this currency amount, or is a different operation code necessary for this?