Advertisement
DMxMWI-N3wbi3

Untitled

Jan 31st, 2022
963
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.92 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Main {
  4.     public static void main(String[] args){
  5.         String first,second;
  6.         Scanner input = new Scanner(System.in);
  7.         System.out.print("Enter First String: ");
  8.         first = input.nextLine();
  9.         System.out.print("Enter Second String: ");
  10.         second = input.nextLine();
  11.         System.out.println("The lowercase of the first string is: " + first.toLowerCase());
  12.         System.out.println("The uppercase of the first string is: " + first.toUpperCase());
  13.         System.out.println("The lowercase of the second string is: " + second.toLowerCase());
  14.         System.out.println("The uppercase of the second string is: " + second.toUpperCase());
  15.         System.out.println("The length of the first string is: " + first.length());
  16.         System.out.println("The length of the second string is: " + second.length());
  17.        
  18.         input.close();
  19.     }
  20. }
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement