Java Program to replace lower-case characters with upper-case and vice-versaHere, our task is to replace all the lower-case characters in the string to upper-case and upper-case characters to lower-case. For this purpose, we need to traverse the string and check for each character. If the character is a lower-case character, make it upper-case by using the language-specific built-in method or add 32 to the lower-case character in C to change the ASCII value of the character. For programming, follow the algorithm given below: Algorithm
Program:Output: String after case conversion: gREAT pOWER Next TopicJava Programs |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India