So I\'m trying to find all the uppercase letters in a string put in by the user but I keep getting this runtime error:
Exception in thread \"main\" java.lan
The simplest way I know is to use regex replacement.
isUp = x.replaceAll("[^A-Z]", "");
In simple terms, this uses a regular expression which matches any character which is not in the A-Z range, and replaces it with an empty string.