Converting a string from snake case to camel case in Java

Guava supports this through its CaseFormat class

import com.google.common.base.CaseFormat;


public class StackOverflow25680258 {

    public static void main(String[] args) {
        System.out.println(CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, "input_in_snake_case")); 
    }

}

Output

InputInSnakeCase

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)