Dize ile Tamsayıyı dönüştürmenin en iyi yolu nedir? (47 buradaTamsayı - Java'daki dize dönüştürme sorunu
params.get("contractPriceId");
alıyorum İstisna
public List<ContractPriceDetailVO> getContractPriceDetails(
Map<String, String> params) throws DAOException {
// Get the request object
HttpServletRequest request = FlexContext.getHttpRequest();
// Get the AppContext object
AppContext ac = SessionUtils.getAppContext(request);
SimpleDateFormat sdf = new SimpleDateFormat(ac.getDateFormat());
List<Object[]> resultList = new ArrayList<Object[]>();
if (params.get("specId") != null && params.get("specId").trim() != ""
&& params.get("effDate") != null
&& params.get("effDate").trim() != null)
resultList = contractPriceEJBService.getContractPriceDetails(ac,
params);
String contractPriceId = null;
if (params.get("contractPriceId") != null){
try{
contractPriceId = params.get("contractPriceId");
}
catch (Exception e){
logger.error("Exception in getting contractPriceId "+e.getMessage());
}
}
else{
contractPriceId = null;
}
Integer.parseInt ("123"); – Paolof76
Bu soru şu anda _very_ belirsizdir. Özel durumunuzun ne olduğu ve bir şeyi dönüştürmeye çalıştığınız net değildir, çünkü yalnızca 'String' ile çalışıyorsunuz. Lütfen eksik bilgileri eklemek için sorunuzu [düzenleyin]. Ayrıca okuyun: [nasıl yapılır] (http://stackoverflow.com/help/how-to-ask). Teşekkür ederim. – Tom