Write a program to get a character as input and change its case
Answers
Answered by
0
Answer:
class change
{
public static void main (String args [])
{
Scanner sc =new Scanner (System.in);
System.out.println("Enter the Character");
char ch =sc.nextLine.charAt(0);
if(Character.isUpperCase(ch))
ch=Character.toLowerCase(ch);
else if (Character.isLowerCase(ch))
ch=Character.toUpperCase(ch);
System.out.println(ch);
}
}
Please Subscribe my Youtube Channel Study To Study ICSE-Swapnil Mehta for more Java Programs
Explanation:
Hope this will help you
Please mark me as brainlist :)
Similar questions