1. 程式人生 > >java instanceof 判斷是否是String

java instanceof 判斷是否是String

if(formbean.getBean().get("RZZGMCM") instanceof String){
formbean.getBean().put("RZZGMCM_ARR", (formbean.getBean().get("RZZGMCM").toString().split(",")));

}else{

formbean.getBean().put("RZZGMCM_ARR", (formbean.getBean().get("RZZGMCM")));
}