Tuesday, April 14, 2015

Cannot Find symbol compile error, need help!


I decided to code this quiz I took in class about asking the user to input a string and the code is suppose to check for upper case letters. If a upper case letter is found, it should increase a count by one. Once the check is done, it should display the number of uppercase letters. For some reason I am getting this weird compile error stating that symbols can't be found. Can anyone help me?



Java Code:



import java.util.*;
import java.lang.*;
public class StringCheck{
public static void main(String[] args){
Scanner input = new Scanner(System.in);
System.out.println("please enter a string: " );
String s = input.nextLine();
int count = 0;
for(int i = 0; i < s.length(); i++){
if(Character.s.charAt(isUpperCase(i))){
count++;
}
}
System.out.println("the number of uppercase letters is: " + count);
}
}


No comments:

Post a Comment