Q:

Write a Java program to convert a given string into lowercase

0

Write a Java program to convert a given string into lowercase


Sample Output:

Input a String: THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.           
the quick brown fox jumps over the lazy dog.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

import java.util.*;
 public class Exercise59 {
     public static void main(String[] args){	
     Scanner in = new Scanner(System.in);
     System.out.print("Input a String: ");
	 String line = in.nextLine();
	 line = line.toLowerCase();
	 System.out.println(line); 
	 }			
}

Sample Output:

Input a String: THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.           
the quick brown fox jumps over the lazy dog

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now