Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
0 Endorsements
Ranked #44.2K
Ranked #3K
~2K People Reached
Favorite Forums
Favorite Tags
java x 4

3 Posted Topics

Member Avatar for JRabbit2307

[CODE]//Find the sum and average for (int i = 0; i < numbers.length; i++){ sum += numbers[i]; int average = sum / TOTAL_NUMBERS; }[/CODE] Here you are making the average an integer, when in reality it should be a float so that you have the correct precision. you can either: …

Member Avatar for Foxh451
0
488
Member Avatar for JRabbit2307

[QUOTE][CODE]//Find the sum and average for (int i = 0; i < numbers.length; i++){ sum += numbers[i]; int average = sum / TOTAL_NUMBERS; }[/CODE][/QUOTE] Here you are making the average an integer, when in reality it should be a float so that you have the correct precision. you can either: …

Member Avatar for masijade
0
1K
Member Avatar for sweebez

I am assuming that you are trying to simply check if your "monster" is alive and if it is, say so in the console? If so, in your main method you simply need: [CODE]if( winston.getEnergy()) { System.out.println("This thing is alive"); }[/CODE] As for your constructor question. A constructor is used …

Member Avatar for 0805638
0
639

The End.