Thursday, July 15, 2021

12. Write a java program to convert String "BerRY" to lowercase.

 public class Main {

      public static void main(String[] args) {

          String name = "BerRY";

          System.out.println(name.toLowerCase());

     }

}


NOTE:

The  output of the above program is berry . Didn't import Scanner as no input was to be taken from the user. String method toLowerCase(); is used to change all upper case letters to lower case letters.

No comments:

Post a Comment