![]() |
|
![]() |
| LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) |
| Member Join Date: Feb 2006 Location: India
Posts: 89
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 4 | debug hi for the following code i am getting java.lang.IllegalArgumentException.. please see if u can resole i am passing vector as argument public void createCSV(Vector weekdays) { String csvData[][] =new String[(weekdays.size()*6)][30]; String csvData2[][] =new String[(weekdays.size()*3)][30]; form = new SimpleDateFormat("MM/dd/yyyy"); java.util.Calendar cal4 = Calendar.getInstance(new SimpleTimeZone((int)(5.5*60*60*1000), "IST")); form.setCalendar(cal4); Enumeration Enum=weekdays.elements(); while(Enum.hasMoreElements()) // Weekdays loop { tempdate = (Date)Enum.nextElement(); cal4.setTime(tempdate); int day_week=cal4.get(Calendar.WEEK_OF_YEAR); date1=form.format(tempdate);// Date in String Format try{ String[] date_pieces =date1.split("/"); mon=date_pieces[0]; date="date_pieces[1]"; year="date_pieces[2]"; } catch(Exception e) { System.out.println(e+"exception1"); } dateS=Integer.parseInt(date1.substring(3,5)); monS=Integer.parseInt(date1.substring(0,2)); yearS=Integer.parseInt(date1.substring(6,10)); dateS= dateS + 1; if((monS==1||monS==3||monS==5||monS==7||monS==8||monS==10||monS==12)&&dateS==32) { dateS=1; monS=monS+1; if(monS>12) { yearS=yearS+1; monS=1; } } else if((monS==4||monS==6||monS==9||monS==11)&&dateS==31) { dateS=1; monS=monS+1; } else if((monS==2)&&(yearS%4)==0&&dateS==30) { dateS=1; monS=monS+1; } else if((monS==2)&&dateS==29) { dateS=1; monS=monS+1; } nextday=new Date(monS+"/"+dateS+"/"+year); |
| | |
![]() |
| Tags |
| debug |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Some Loadrunner FAQs | kiran2710 | Testing Tools & QA | 1 | 25-10-08 12:42 AM |
| ABAP - debug | Spoorthi | SAP ABAP, SAP MM, SAP DD, SAP BASICS & OTHERS | 8 | 19-10-06 03:11 PM |
| interview faqs--SAP SCRIPTS | Spoorthi | SAP ABAP, SAP MM, SAP DD, SAP BASICS & OTHERS | 7 | 27-04-06 01:19 AM |
| please debug | Tan | DATA STRUCTURES, C, C++, VC ++ | 7 | 05-03-06 02:09 AM |
| How to Debug in VC++ | Swatantra | DATA STRUCTURES, C, C++, VC ++ | 1 | 22-02-06 04:23 AM |
| More Interview Questions Here... |