Connect with one of the following accounts


Please wait while we redirect...

Views: 206   

Following program shows you how to convert given string to upper case.
In this program we get string from user and convert that string to upper case using .toUpperCase()

import java.util.Scanner;

public class StringOperations11 {

    public static void main(String[] args) {

        String input;

        Scanner in = new Scanner(;

        System.out.println("Please enter a string:");

        input = in.nextLine();

        String upperCase = input.toUpperCase();

        System.out.println("Given string to upper case: " + upperCase);



Please enter a string:
Given string to upper case: HELLO

On By

Top Tutorials

Top Questions

Top Articles

Top Blogs

Top News