Results 1 to 2 of 2
Thread: Help with debugger!!
- 04-06-2008, 11:33 PM #1
Member
- Join Date
- Apr 2008
- Posts
- 1
- Rep Power
- 0
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;
}
- 04-07-2008, 03:01 AM #2
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! :)Vote for the new slogan to our beloved Java Forums! (closes on September 4, 2008)
Want to voice your opinion on your IDE/Editor of choice? Vote now!
Got a little Capt'n in you? (drink responsibly)
Similar Threads
-
JSwat Java Debugger 4.2
By levent in forum Java SoftwareReplies: 0Last Post: 05-19-2007, 08:14 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks