Java tutorial
//package com.java2s; public class Main { public static final String IS = "is"; public static final String GET = "get"; public static final String SET = "set"; public static String getPropertyName(String name) { if (name.startsWith(IS)) { return name.substring(IS.length()); } else if (name.startsWith(GET)) { return name.substring(GET.length()); } else if (name.startsWith(SET)) { return name.substring(SET.length()); } return null; } }