We are moved to new domain
Click -> www.ehowtonow.com
Sunday, 3 May 2015

How to convert a String to Upper case

Following example shows how to convert a string to upper case.

Sample Program

package com.javatutorialcorner.javastring;

public class ToUpperCase {

public static void main(String[] args) {
String input = "Java tutorials corner contains tutorials for Java programers day to day needs tutorials like Java, Spring, Hibernate, String, JSON, Jackson, GSON, XML parsing, Web Service, SOAP Web Service, RESTful Web Service";
String upperCase = input.toUpperCase();

System.out.println("Input String : " + input);
System.out.println("Upper case String : " + upperCase);

}

}


Output


The above code will produce the following out



Input String : Java tutorials corner contains tutorials for Java programers day to day needs tutorials like Java, Spring, Hibernate, String, JSON, Jackson, GSON, XML parsing, Web Service, SOAP Web Service, RESTful Web Service
Upper case String : JAVA TUTORIALS CORNER CONTAINS TUTORIALS FOR JAVA PROGRAMERS DAY TO DAY NEEDS TUTORIALS LIKE JAVA, SPRING, HIBERNATE, STRING, JSON, JACKSON, GSON, XML PARSING, WEB SERVICE, SOAP WEB SERVICE, RESTFUL WEB SERVICE

Shop and help us

Flipkart Offer Snapdeal offer Amazon.in offer Amazon.com offer
  • Blogger Comments
  • Facebook Comments
  • Disqus Comments

0 comments:

Post a Comment

Item Reviewed: How to convert a String to Upper case Rating: 5 Reviewed By: eHowToNow