Ferix

RSOJava#2

Nov 25th, 2020 (edited)
251
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.Scanner;
  2.  
  3. public class MyClass {
  4.     public static void main(String args[]) {
  5.         Scanner input = new Scanner(System.in);
  6.        
  7.         try{
  8.             int inputL = input.nextInt();
  9.             System.out.println("Input is an int!");
  10.         }catch(Exception e1){
  11.         }
  12.         try{
  13.             char inputL = input.nextLine().charAt(0);
  14.             if(!Character.isLetter(inputL)){
  15.                  System.out.println("Input is a special char!");
  16.             }else if (Character.isLowerCase(inputL)){
  17.                 System.out.println("Input is a lowercase char!");
  18.             }else{
  19.                  System.out.println("Input is an uppercase char!");
  20.             }
  21.         }catch(Exception e2){
  22.         }
  23.        
  24.    
  25.     }
  26. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×