How to convert a String in Upper case

In this problem we will learn how to convert a string characters into Upper case. The Program will received the input from the user and save them in a string . After this a String function toUppercase is applied and display it on the Prompt. 

Source Code


package com.ancodingpoint.www;
import java.util.Scanner;

public class Upper_Case
{
 public static void main(String[] args)
 {
            Scanner input = new Scanner (System.in);
            String story ="";
           System.out.println(" Enter Your Story Here .....!");
            story = input.nextLine();
            story = story.toUpperCase();
            System.out.println(story);
        }
}

Output of the Program


Java String Programming



Share on Google Plus

About Asad

Asad Niazi is Software Engineer , Programmer, Web Developer and a young mentor of BloggersTown and PProgramming. Asad Love to writes about Technology, Programming, Blogging and make money online.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment