I'm confused...
What is this program supposed to do inside the switch statement?
As the program is currently written, the return value from the JOptionPane.showInputDialog is strChoice.
strChoice is parsed as an Integer and used as the argument for the switch.
Inside the switch statement, strChoice is parsed again as an integer, double, etc. And you are supposed to throw an exception if it's not a int/double???
I'm guessing what you are trying to accomplish and I might not be correct, but it seems like there should be two input values. A value that can be a
string, int, double, etc. And another that indicates what type that first value is.
Then based on what type was entered you can parse the other value to verify the type is correct.