Advertisement
if_alan

Question 5

Nov 20th, 2017
333
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.24 KB | None | 0 0
  1. public String compareAlpghabet(String A, String B){
  2.         if(Character.isUpperCase(A.charAt(0)) && Character.isUpperCase(B.charAt(0)))
  3.             return A.charAt(0) > B.charAt(0) ? B : A;
  4.         else return "Throw Exception";
  5.     }asdad
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement