public static void main(String[] args) throws Exception{ // TODO Auto-generated method stub AA a=new AA(1,"wms1"); BB b=new BB(2,"wms2"); //显示某对象的某方法和某属性 show(a,"show"); } //对未知类型的对象操作 public static vo id show(Object obj,String method_name)throws Ex
操作String,提供了很多简便的API public class TestLang { public static void main(String[] args) { String str1 = StringUtils.repeat("Java", 10); System.out.println(str1); String str2 = StringUtils.abbreviate("how long no see you", 12); System.out.println(str2);