Search:

Type: Posts; User: Robertgif

Search: Search took 0.10 seconds.

  1. Replies
    12
    Views
    1,231

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

    While i'm still learning I have just been using the command prompt to run everything, help me understand how the coding really works, but thanks!
  2. Replies
    12
    Views
    1,231

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

    Alright! Thanks so much!

    I was getting rather frustrated so I went to go do some general reading on java and it kind of hit me like an epiphany. <:-P

    I was declaring my player objects inside of...
  3. Replies
    12
    Views
    1,231

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

    Alright, thanks for the suggestions.

    So this was my original code:

    public void startFight() {
    while (fighter1.health > 0 & fighter2.health > 0) {
    fighter1.attack();
    fighter2.attack();...
  4. Replies
    12
    Views
    1,231

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

    Thank you Norm, but I've read this when I was researching the problem before I made the original post and I can't figure out what is wrong with the line of code or why it has a null value.

    The...
  5. Replies
    12
    Views
    1,231

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

    Okay sorry, Ill post the other two classes that are involved in the program:

    Here is the player class which I don't believe has an error in it:

    public class player{
    int health;
    char sex;...
  6. Replies
    12
    Views
    1,231

    [SOLVED] New programmer, basic error help!

    Hello all! I JUST started coding java and I was just practicing and I came across an error:

    Exception in thread "main" java.lang.NullPointerException
    at...
Results 1 to 6 of 6