Search:

Type: Posts; User: Norm

Search: Search took 0.13 seconds.

  1. Replies
    12
    Views
    1,233

    [SOLVED] Re: New programmer, basic error help!

    Many of us think starting with the command prompt is the best way.
    Try writing some classes in packages and using them to see how to use classpath.
    Just simple "Hello world" classes but with...
  2. Replies
    12
    Views
    1,233

    [SOLVED] Re: New programmer, basic error help!

    That error is called shadowing: having a local variable with the same name as a class variable.
    I don't know why IDEs don't give a warning when it is done. I can't think of a time that you would...
  3. Replies
    12
    Views
    1,233

    [SOLVED] Re: New programmer, basic error help!

    Same question as before, now for line 23. What variable is null?

    This code ( fighter1.health) uses two variables:
    fighter1
    and
    fighter1.health

    health is an int which can NOT have a null...
  4. Replies
    12
    Views
    1,233

    [SOLVED] Re: New programmer, basic error help!

    What variable has the null value? If you can't tell by looking, use a println statement to print out the values of the variables so you can see. Add the println immediately before where the error...
  5. Replies
    12
    Views
    1,233

    [SOLVED] Re: New programmer, basic error help!

    At line 26 in fightGame there was a variable with a null value when that statement was executed. Find the variable with the null value and backtrack in the code to see why that variable didn't have...
Results 1 to 5 of 5