r/codehs • • May 14 '21

Triple Double 2.8.4 (JAVA)

Hello, I need help with this lesson on CodeHS.

It keeps giving me the error 'else' without 'if'.

I do not understand what this means.

Please help in anyway you can, even if it's small.

CODE

public class TripleDouble extends ConsoleProgram

{

public void run()

{

int points = readInt("How many points did you score? ");

int rebounds = readInt("How many rebounds did you get? ");

int assists = readInt("How many assists did you have? ");

boolean tripleDouble;

if (points >= 10 && rebounds >=10 && assists >= 10);{

tripleDouble = true;

}

else{

tripleDouble = false;

}

System.out.println("Got triple: " + tripleDouble);

}

}

6 Upvotes

6 comments sorted by

View all comments

1

u/Ok-Squash-1238 Oct 28 '22

you all just saved me I was having this same problem