Java tutorial
//package com.java2s; public class Main { public static String addGetString(String fieldName) { StringBuffer sb = new StringBuffer(); if (fieldName.startsWith("is")) { return fieldName; } sb.append("get"); sb.append(fieldName.substring(0, 1).toUpperCase()); sb.append(fieldName.substring(1)); return sb.toString(); } }