Java - Write code to convert camel case Pascal case

Requirements

Write code to convert camel case Pascal case

Demo

//package com.book2s;

public class Main {
    public static void main(String[] argv) {
        String source = "AbcDef book2s.com";
        System.out.println(camel2Pascal(source));
    }/* w w  w . java  2 s  .c o  m*/

    public static String camel2Pascal(String source) {
        return source.replaceFirst(source.substring(0, 1), source
                .substring(0, 1).toUpperCase());
    }
}