Java tutorial
//package com.java2s; public class Main { public static String getSetterName(String fieldName) { if (fieldName == null || fieldName.length() == 0) return ""; String first = String.valueOf(fieldName.charAt(0)); first = first.toUpperCase(); return "set" + first + fieldName.substring(1); } }