提示:您可在线编辑运行本教程的实例 - 运行实例,去试试!
calc吸气剂名称Bool用于反射
//package com.nowjava; /* 来 自* N o w J a v a . c o m */ public class Main { public static void main(String[] argv) throws Exception { String fieldName = "nowjava.com"; System.out.println(calcGetterNameBool(fieldName)); } public static String calcGetterNameBool(String fieldName) { return "is" + ucfirst(fieldName); } public static String ucfirst(String str) {