Advertisement
DidiHristova93

Untitled

Oct 9th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class techModuleUpperToLower {
  4. public static void main(String[] args) {
  5. Scanner scanner = new Scanner(System.in);
  6.  
  7. String lowOrUp = scanner.nextLine();
  8.  
  9. boolean hasUppercase = !lowOrUp.equals(lowOrUp.toLowerCase());
  10. boolean hasLowercase = !lowOrUp.equals(lowOrUp.toUpperCase());
  11.  
  12. if(hasUppercase)
  13. System.out.println("upper-case");
  14. if(hasLowercase)
  15. System.out.println("lower-case");
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement