Lower Upper problem----

what is the error in my code-----

import java.util.;
//import java.uitl.regex.
;
public class Main {
public static void main(String args[]) {
Scanner cin = new Scanner(System.in);
char ch = cin.nextChar();
Pattern pt = Pattern.compile("[^a-z]");
Matcher match= pt.matcher©;
Pattern pt1 = Pattern.compile("[^A-Z]");
Matcher match1= pt1.matcher©;
if(match.isFind()){
System.out.println(“lowercase”);
}else if(match1.isFind()){
System.out.println(“UPPERCASE”);
}else{
System.out.println(“Invalid”);
}

}

}

You don’t have to necessarily use Regex in this question. It can be solved using ASCII values. And use import java.util.*; to import java util package. And in Scanner class, there is no nextChar(), hence use cin.next().charAt(0) to input a char. It takes input as a string and the charAt(0) function returns the first char.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.