Computer Science, asked by h3lpp1zz, 1 month ago

create a java program that will initialize the string value. the program will convert the string to its equivalent uppercase and lowercase and display the output. the program will determine the length of the string through length method.

Answers

Answered by imtiyazallam
0

Answer:

import java.util.*;

public class Test{

public static void main(String[] args){

Scanner sc = new Scanner(System.in);

System.out.print("Enter a string data: ");

String str = sc.nextLine();

System.out.println("Upper case: " + str.toUpperCase());

System.out.println("Lower case: " + str.toLowerCase());

System.out.println("Length: " + str.length());

}

}

Similar questions