45,000 Jobs - Get an Interview Call,  Post Your Resume Here
SURESHKUMAR.NET FORUMS
Registered Member Login:
Not a member? Register today!



Welcome to the SURESHKUMAR.NET FORUMS.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.




debug

        

Reply
 
LinkBack Thread Tools Display Modes
Old 22-11-06, 02:32 AM   #1 (permalink)
Member
 
Join Date: Feb 2006
Location: India
Posts: 89
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 4 qaisar has disabled reputation
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);

qaisar is offline Offline   Reply With Quote
Reply

Tags
debug


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On


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


All times are GMT +6.5. The time now is 12:18 PM.

More Interview Questions Here...

Content Relevant URLs by vBSEO 3.3.0