Vector voyagelist =new Vector();
int dsc =Integer.parseInt(dscDetails.strDscKey);
KEY_DSC keyDSC = new KEY_DSC(dsc);
System.out.println(keyDSC.toString());
voyagelist.addElement(new TP_DSCVoyChange(keyDSC,dscDetails.voyage));
since KEY_DSC class has a constructor that takes int parameter then converting string into int and passing it to the ctor resolves the issue.