Q:

Make the next character of a space as capital

Possible Duplicate:
Capitalize First Char of Each Word in a String Java 

I have a string "abc def ghi" , I want to make it as "Abc Def Ghi".Similarly I also have a string like "abc def" and I want to make it "Abc Def".In java how is it possible?

A:

System.out.println(
  org.apache.commons.lang.WordUtils.capitalize(
    "yellow fox jumped over brown foot"
  )
);

output:
Yellow Fox Jumped Over Brown Foot

