import java.io.*;
import java.lang.*;
public class don{
public static void main(String args[]){
String prabhu = "my name is baadshah khan";
String str1 = "He Prabhu";
char[] str2 = new char[34];
System.out.println("Length of string prabhu :" + prabhu.length());
System.out.println("character at third position :" + prabhu.charAt(3));
str1.getChars(0, str1.length(), str2, 0) ;
char a = prabhu.charAt(0);
char b = prabhu.charAt(1);
char c = prabhu.charAt(2);
char d = prabhu.charAt(3);
char e = prabhu.charAt(4);
char f = prabhu.charAt(5);
char g = prabhu.charAt(6);
char h = prabhu.charAt(7);
char i = prabhu.charAt(8);
char j = prabhu.charAt(9);
char k = prabhu.charAt(10);
char l = prabhu.charAt(11);
char m = prabhu.charAt(12);
char n = prabhu.charAt(13);
char o = prabhu.charAt(14);
char p = prabhu.charAt(15);
char q = prabhu.charAt(16);
char r = prabhu.charAt(17);
char s = prabhu.charAt(18);
char t = prabhu.charAt(19);
char u = prabhu.charAt(20);
char upper = Character.toUpperCase(a);
char upper1 = Character.toUpperCase(b);
char upper2 = Character.toUpperCase(c);
char upper3 = Character.toUpperCase(d);
char upper4 = Character.toUpperCase(e);
char upper5 = Character.toUpperCase(f);
char upper6 = Character.toUpperCase(g);
char upper7 = Character.toUpperCase(h);
char upper8 = Character.toUpperCase(i);
char upper9 = Character.toUpperCase(j);
char upper10 = Character.toUpperCase(k);;
char upper11 = Character.toUpperCase(l);
char upper12 = Character.toUpperCase(m);
char upper13 = Character.toUpperCase(n);
char upper14 = Character.toUpperCase(o);
char upper15 = Character.toUpperCase(p);
char upper16 = Character.toUpperCase(q);
char upper17 = Character.toUpperCase(r);
char upper18 = Character.toUpperCase(s);
char upper19 = Character.toUpperCase(t);
char upper20 = Character.toUpperCase(u);
System.out.print(upper);
System.out.print(upper1);
System.out.print(upper2);
System.out.print(upper3);
System.out.print(upper4);
System.out.print(upper5);
System.out.print(upper6);
System.out.print(upper7);
System.out.print(upper8);
System.out.print(upper9);
System.out.print(upper10);
System.out.print(upper11);
System.out.print(upper12);
System.out.print(upper13);
System.out.print(upper14);
System.out.print(upper15);
System.out.print(upper16);
System.out.print(upper17);
System.out.println(upper18);
System.out.println(str1.length());
System.out.println(str2);
}
}
------------------------------
read for more information,
http://www.roseindia.net/java/