Don't you mean
String square = "square";
The thing is you want to compare what the user enters with the string s-q-u-a-r-e, not with a variable square.
-----
Type: Posts; User: pbrockway2
Don't you mean
String square = "square";
The thing is you want to compare what the user enters with the string s-q-u-a-r-e, not with a variable square.
-----
Step back from the code a little and ask yourself what you expect the user to enter as a response to "Firstly, input what shape you want to find the perimeter and area of."
You have complete...
You will get an InputMismatchException at runtime when you ask the scanner for some particular type of input (like an int) but the scanner hits something that it simply can't interpret as that type...