Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-07-2008, 01:33 AM
Member
 
Join Date: Apr 2008
Posts: 1
anatel24 is on a distinguished road
Help with debugger!!
Hi, I'm new to Java and I have to write a method which counts the business days between two given days. I've already written it but it doesn't seem to work, and when I try the debugger it doesn't work and displays "no current thread to display", please help!!!!!

This is the code:

public String diasHab (int dia1, int mes1, int agno1, int dia2,
int mes2, int agno2)

{ int d1 = dia1;
int m1 = mes1;
int a1 = agno1;
int d2 = dia2;
int m2 = mes2;
int a2 = agno2;
String diasN = diasNat (d1, m1, a1, d2, m2, a2);
int diasNa = Integer.parseInt(diasN);
String j1 = diaSem (d1, m1, a1);
int j = Integer.parseInt (j1);
int [] semana = {0, 1, 2, 3, 4, 5, 6};
int resultado = 0;
int cuenta = 0;
int numRest = 0;
String resdev = "";

if ((Validez (dia1, mes1, agno1) == true) && (Validez (dia2, mes2, agno2)
== true))
{

while (cuenta != diasNa)
{ if ((semana [j] == 0) ||(semana [j] == 6))
{numRest = numRest + 1;
}
j = j+1;
cuenta = cuenta + 1;
if (j == 7)
{j = 0;}
}

resultado = diasNa - numRest;
resdev = Integer.toString(resultado);

}
return resdev;
}
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 04-07-2008, 05:01 AM
CaptainMorgan's Avatar
Moderator
 
Join Date: Dec 2007
Location: NewEngland, US
Posts: 841
CaptainMorgan will become famous soon enoughCaptainMorgan will become famous soon enough
Send a message via AIM to CaptainMorgan
I'm afraid without comments or specifics of any kind, solving a program not written in the base of English is going to be difficult for a lot of members... unless someone here understands the written language and Java together(jump right in!) ? I could probably decode it based on what the code is doing... but it would definitely likely lead to more time than I'm willing to commit versus examining it had it been in English. If you get no answer, consider writing this in English, throwing in some helpful comments to give us an idea of what the method is doing and please use [ code] [ /code] to view your code easier(use the posts "preview" to verify you've used the tags correctly).

Nevertheless, welcome to the forums!
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
to our beloved Java Forums!
(closes on September 4, 2008)
Want to voice your opinion on your IDE/Editor of choice?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
!
Got a little Capt'n in you? (drink responsibly)
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
JSwat Java Debugger 4.2 levent Java Announcements 0 05-19-2007 10:14 AM


All times are GMT +3. The time now is 08:07 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org