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!
Type: Posts; User: Robertgif
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!
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...
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();...
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...
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;...
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...