Pages

Convert String to uppercase

Complete source code below will show you, how to convert a String to uppercase.

****************************************************************************
COMPLETE SOURCE CODE FOR : ConvertStringToUppercase.java
****************************************************************************


public class ConvertStringToUppercase
{
public static void main(String[]args)
{
//Create a String
String a="Hi everybody!";

//Convert created String to uppercase
a=a.toUpperCase();

//Print the String
System.out.println(a);
}
}


****************************************************************************
JUST COMPILE AND EXECUTE IT
****************************************************************************
Related Posts Plugin for WordPress, Blogger...