I wrote and rewrote this code several times!
I copied it from a video tutorial
BUT i can not figure out why it does not let me access a method
[code]
package pachet;
public class Main {
public static void main(String[] args) {
}
int highScore = calulateHighScore(1500);
displayHighScore("Alex",highScore);
public static void displayHighScore(String playerName, int highScore){
System.out.println(playerName+" managed to get into position " + highScore + " on the high score table");
}
public static int calulateHighScore(int playerScore) {
if(playerScore > 1000){
return 1;
}else if (playerScore < 1000 && playerScore >500){
return 2;
}else if(playerScore <500 && playerScore >100){
return 3;
}else {
return 4;
}
}
}
[code]
I created the "displayHighScore" why can`t i access it.
whith the second method it`s no problem, what am i doing wrong ??
This really bugs me :(
i wasted one day to figure it out and still cant do it
i suspect the problem is elementary
PS its my 2nd day on java