Convert string case

ReturnMethodSummary
StringtoLowerCase()Converts this String to lower case using the rules of the default locale.
StringtoLowerCase(Locale locale)Converts this String to lower case using the rules of the given Locale.
StringtoUpperCase()Converts this String to upper case using the rules of the default locale.
StringtoUpperCase(Locale locale)Converts this String to upper case using the rules of the given Locale.

public class Main {
  public static void main(String[] argv) {
    String str = "jAvA2s.com";
    System.out.println(str.toLowerCase());
    System.out.println(str.toUpperCase());

  }
}

The output:


java2s.com
JAVA2S.COM
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.