I am currently working hard on writing this project i have for my java programming class. I have written almost all of the code but i am stuck while complieing it in its current form. I keep getting Java error: Cannot find symbol for the line of code i have underlined. well it says [U] next to the line. its not really underlined.
In this project i'm trying to get it to tell me if each character of a string is lower case, upper case or not a letter.
Please help me I have no idea how to correct this error. Thank you!
import java.util.Scanner; public class LetterCase { public static boolean isThisSpace(char sentence) { return sentence ==(' '); } public static boolean isThisUpperCase(char sentence) { return (sentence>= 'A' &&sentence <= 'Z'); } public static boolean isThisLowerCase(char sentence) { return (sentence>= 'a' && sentence <= 'z'); } public static void main(String[] args) { Scanner keyboard_input = new Scanner(System.in); System.out.print("Please enter a sentence : "); String sentence = keyboard_input.nextLine(); int length = sentence.length(); for(int i=0; i < length; i++) { char sentences = sentence.charAt(i); [U]if(sentence.isThisUpperCase(sentence))[/U] { System.out.println(sentence.charAt(i)+ ":" + "Upper Case"); }