Java - Write code to convert pascal case to Camel case

Requirements

Write code to convert pascal case to Camel case

Demo

//package com.book2s;

public class Main {
    public static void main(String[] argv) {
        String source = "abdDef";
        System.out.println(pascal2Camel(source));
    }/*  w ww .ja  v  a2  s  . com*/

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

Related Exercise