Java tutorial
//package com.java2s; public class Main { public static String getMethodName(String field) { String methodName = field.substring(1); String upperCase = field.substring(0, 1).toUpperCase(); methodName = "set" + upperCase + methodName; return methodName; } }