How can i do this?


Ad

Advertisements

Joined
Jan 8, 2022
Messages
11
Reaction score
0
i did that but it didn't work. here is the code

public static void main(String[] args) {
Scanner reader = new Scanner(System.in);
System.out.println("Put in your letter");
char c = reader.next().charAt(0);
if (Character.isUpperCase); {
System.out.println("your letter is uppercase");
} if (Character.isLowerCase); {
System.out.println("Your letter is lowercase");
}
}
 
Joined
Mar 3, 2021
Messages
174
Reaction score
19
Those are functions, the first argument of which is the character to check. E.g.,

Code:
Character.isUpperCase(c)
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top