How can I convert snake case to camel case in Java?
Input: "input_in_snake_case"
Output: "InputInSnakeCase"
How can I convert snake case to camel case in Java?
Input: "input_in_snake_case"
Output: "InputInSnakeCase"
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