Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package dataTypes;
- import java.util.Scanner;
- public class P08LowerOrUpper {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- char symbol = scanner.nextLine().charAt(0);
- if (Character.isUpperCase(symbol)) {
- System.out.println("upper-case");
- } else {
- System.out.println("lower-case");
- }
- // if (symbol >= 'A' && symbol <= 'Z') {
- // System.out.println("upper-case");
- // } else {
- // System.out.println("lower-case");
- // }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement