Java examples for Reflection:Java Bean
calc Getter Name Bool for reflection
//package com.java2s; public class Main { public static void main(String[] argv) throws Exception { String fieldName = "java2s.com"; System.out.println(calcGetterNameBool(fieldName)); }/*w w w. j ava2s . c om*/ public static String calcGetterNameBool(String fieldName) { return "is" + ucfirst(fieldName); } public static String ucfirst(String str) { return Character.toUpperCase(str.charAt(0)) + str.substring(1); } }