In this section, you will learn how to use toUpperCase() method of the String class. We are going for using toUpperCase() method. This method is explained as follows:
Description of program:
Here, you will see the procedure of converting letters of the string in uppercase letter. So, we are using toUpperCase() method of the String class for the purpose.
The following program convert the string "india" into "INDIA" by using toUpperCase() method.
toUpperCase(): This method returns a string value.
Here is the code of this program:
public class ConvertInUpperCase{
|
Output of program:
| C:\java_work>javac ConvertInUpperCase.java C:\java_work>java ConvertInUpperCase String is : india String in uppercase letter: INDIA C:\java_work> |
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.
Ask Questions? Discuss: toUpperCase() Method In Java View All Comments
Post your Comment