Compile and Run the code
To compile the code, run the following command in the terminal:
javac CharacterExample.java
After successfully compiling the code, to execute the code, run the following command:
java CharacterExample
When you run the above code, it prompts the user to enter a character. After a user enters a character, the code checks whether the entered character is lowercase or not. The output will look something like this:
Enter the character: u
u is a lowercase?: true
If you enter any non-lowercase character, the output will look something like this:
Enter the character: R
R is a lowercase?: false