Monday 23 June 2014

toUpperCase()

public String toUpperCase()
Converts all of the characters in this String to upper case using the rules of the default locale.

class StringToUpperCase{
 public static void main(String args[]){
  String str = "eFgHiJkLm";
  String upper = str.toUpperCase();
  
  System.out.println("str = " + str);
  System.out.println("upper = " + upper);
 } 
}

Output
str = eFgHiJkLm
upper = EFGHIJKLM




Prevoius                                                 Next                                                 Home

No comments:

Post a Comment