public class myTest
{
public static void main(String[] args)
{
String word;
Scanner sc = new Scanner(System.in);
System.out.print("请输入一个小写的英文单词:");
word = sc.nextLine();
System.out.println(getPropertyGetMethodName(word));
}
public static String getPropertyGetMethodName(String property)
{
String bgnStr = property.substring(0, 1).toUpperCase();
String endStr = property.substring(1);
return "get" + bgnStr + endStr;
}
}