Re: a very confusing exception
Code :
for(int k=0; k<=kmax; k++)
{
System.out.println(k*dt+" "+ y[0][k]+" "+ y[2][k]);
System.out.printf("%7.5f \t %7.5e \t %7.5e \n", k*dt, y[0][k], y[2][k]);
}
The result is just the same as that without the sentence System.out.println(k*dt+" "+ y[0][k]+" "+ y[2][k]);
What confusing is when I change the number of line that causes exception by adding other codes or blanks.The exception information do not change at all,so that sometimes the number of line appearing in the exception information points to a comment or a bracket.
I don not have many experience about debugging.Can you give a brief explain about that.
About that sentence I mean that the value of variables could always be followed in debug perspective but I failed this time because of accidental interruption of debugging procedure with a problem "source not found".
Thank you
Re: a very confusing exception
Quote:
exception information do not change at all
You must have an old version of the class file somewhere. Erase all the old .class files and build new ones.
Quote:
debugging.Can you give a brief explain about that.
I use the println command to print out the values of variables so I can see what the computer is using and where the execution flow is going.
Re: a very confusing exception
yes.The problem seems to be clear now.There is an old version .class file that executed unchangeably every time whatever I do to my program.So I can not debug it in a right way.But when I have deleted it from the workspace of Eclipse and tried to compile source codes again,it can not be succeed in compiling new .class file neither through eclipse nor DOS.Do you have any ideas about what happened here.
thx
Re: a very confusing exception
Are you getting error messages when you try to compile it using a command prompt window?
If so, please copy and paste them here.
To copy the contents of the command prompt window:
Click on Icon in upper left corner
Select Edit
Select 'Select All' - The selection will show
Click in upper left again
Select Edit and click 'Copy'
Paste here.
Re: a very confusing exception
This problem has been solved.Thank you very much.