need help with java program...

0 Aaron Hebert · June 19, 2014
I need help with this java program guys... here is the code and what i am trying to do... 

I want my enemy's health to deplete by 5 until it reaches 0. The health starts at 40, but every time i press one for the attack it just keeps repeating "Your enemy's health is 35 now or your enemy's health is zero "he has been killed".... any help would be much appreciated! /images/forum/0f14a376da29a8f778a14d33bc29051f.png

Post a Reply


Oldest  Newest  Rating
+1 Rich Sharma · August 19, 2015
== is boolean knowledge. you would do this in if statements, else if statements, loops, and other parts that involve testing if some
object is equal to another object. = should be used where it says hit set to 0. so set hit = 0, instead of using ==, because = is the sign that is used to set an object equal to something. that is how java works.
0 Durant ShaoQiang · August 19, 2015
    learn to solve problems using the error information 
  • 1

Java / Android Development


Very popular language used to create desktop applications, website applets, and Android apps.

Bucky Roberts Administrator