Not so. Code readability is important but clarity != short.
Once again you are trying to use bitwise & for a logical statement. Please see Learning the Java Language > Language Basics >...
Type: Posts; User: ChristopherLowe
Not so. Code readability is important but clarity != short.
Once again you are trying to use bitwise & for a logical statement. Please see Learning the Java Language > Language Basics >...
But that's not what it is doing:
public static void methodswitch(String LetterSelection)
The 'void' part of this method declaration means "I don't return anything". However this isn't the...
Regular expressions allow you to test if a string matches a certain pattern. They have their place but try and avoid them if there is an alternative. In your case a couple of if .equals() is more...
See Learning the Java Language > Language Basics > Operators
& is bitwise AND
&& is logical AND.
You want logical AND.
You could use regular expressions but adding complexity to shorten...