摘要:
java1.7已经支持了匹配字符串方案1. 1 enum Animal { 2 3 dog,cat,bear; 4 5 public static Animal getAnimal(String animal){ 6 7 return valueOf(animal ); 8 9 } 10 11 }12 13 14 15 public class Client { 16 17 public void caseAnimal(String animal){ 18 19 switch(Animal.getAnim... 阅读全文
摘要:
[1].[代码][Java]代码view sourceprint?01try{02Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");03String url ="jdbc:odbc:Driver={Microsoft Access Driver "+04"(*.mdb, *.accdb)};DBQ=C:\\Database\\Northwind 2007.accdb";05Connection con = DriverManager.getConnection(url);06System.ou 阅读全文