input a alphabet and print in other case in java (please answer fast)
Answers
Answered by
0
Answer:
public class Main
{
public static void main(String[] args) throws Exception{
System.out.print("Enter a char:");
char c = (char)System.in.read();
if(Character.isLowerCase(c)){
System.out.println(Character.toUpperCase(c));
}
else{
System.out.println(Character.toLowerCase(c));
}
}
}
Explanation:
Similar questions