Uppercase in Java | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Uppercase in Java

Hi, I am currently stuck on the following problem using Java in Eclipse IDE. I am asking user to enter a word (greater than 3 letters) and then have it displayed in three different ways. I am unsure on how to set specific letters in uppercase. Example: 1- middle letter in uppercase: jaMes 2- second letter uppercase: jAmes 3- second to last letter in uppercase: jamEs Thank you!

29th Sep 2020, 3:17 PM
williamjvmes
williamjvmes - avatar
1 Answer
+ 3
Found here, all you need. There are string methods to get a char by Index, get Substrings and change the case from upper / lower to what you want. https://docs.oracle.com/javase/tutorial/java/data/manipstrings.html
29th Sep 2020, 3:48 PM
Coding Cat
Coding Cat - avatar