+ 12

How can I convert string outputs to uppercase in Java?

I newly started programming and I started working with java .

2nd Oct 2019, 6:16 AM
Fau_zi
Fau_zi - avatar
3 Answers
+ 7
You can use toUpperCase method of String. It *returns* a string converted to uppercase letters. Declare a string. String text="This is cool"; System.out.println(text.toUpperCase()); It'll print string in uppercase .remember original string won't change.
2nd Oct 2019, 6:30 AM
šŸ‡®šŸ‡³OmkaršŸ•‰
šŸ‡®šŸ‡³OmkaršŸ•‰ - avatar
2nd Oct 2019, 7:56 AM
HNNX šŸæ
HNNX šŸæ - avatar
+ 4
String type as Word? Use uppercase function
2nd Oct 2019, 6:27 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar