Hey guys,
I've been working on this for a few days. My method, displayHSP isn't printing out. The code is running without errors, but it is just running and saying "Process finished with exit code 0," and no of the System.out.println(...); that should be printing is printing. Can you take a look for me. This literally my third day on this stuff, so I'm probably missing something obvious. My IDE is saying there are no errors, but, again, it's not doing the print out. Code below:
public class Main { public static void main(String[] args) { // write your code here } int hsp = calcHSP(1500);{ displayHSP("Steve", hsp); hsp = calcHSP(900); displayHSP("Bob", hsp); hsp = calcHSP(400); displayHSP("Joey", hsp); hsp = calcHSP(50); displayHSP("Jimmy", hsp); } public static void displayHSP(String playerName, int hsp) { System.out.println(playerName + "managed to get into position" + hsp + "on the high score table"); } public static int calcHSP(int playerScore) { if (playerScore > 1000) { return 1; } else if (playerScore > 500 && playerScore < 1000) { return 2; } else if (playerScore > 100 && playerScore < 500) { return 3; } else { return 4; } } }