Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Page 2 of 2 FirstFirst 12
Results 26 to 30 of 30

Thread: a very confusing exception

  1. #26
    Junior Member
    Join Date
    Jun 2012
    Posts
    17
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Re: a very confusing exception

     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

  2. #27
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: a very confusing exception

    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.

    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.
    Last edited by Norm; June 6th, 2012 at 03:01 PM.
    If you don't understand my answer, don't ignore it, ask a question.

  3. #28
    Junior Member
    Join Date
    Jun 2012
    Posts
    17
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default 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

  4. #29
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default 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.
    If you don't understand my answer, don't ignore it, ask a question.

  5. #30
    Junior Member
    Join Date
    Jun 2012
    Posts
    17
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Re: a very confusing exception

    This problem has been solved.Thank you very much.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 11
    Last Post: April 5th, 2012, 08:34 PM
  2. What is Abstraction?The Confusing Concept Simplified
    By rainbow9 in forum Java Theory & Questions
    Replies: 1
    Last Post: December 14th, 2011, 11:43 PM
  3. [SOLVED] ArrayList object's elements confusing??? doesnt replace the elements? set() method?
    By chronoz13 in forum What's Wrong With My Code?
    Replies: 10
    Last Post: June 21st, 2011, 01:20 PM
  4. Button help, confusing error.
    By camboy8 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: December 17th, 2010, 10:25 PM
  5. While (logical confusing output)
    By chronoz13 in forum Loops & Control Statements
    Replies: 4
    Last Post: December 20th, 2009, 01:17 AM