Java help

Associate
Joined
1 Jan 2010
Posts
1,021
Hey guys,

I'm learning Java from a video tutorial course,

I have the following piece of code:

public static void main(String[] args)

{
double testScore = 0.0;
System.out.println("Please enter your score: ");

Scanner input = new Scanner();
testScore = input.nextInt();

if(testScore < 65) [
System.out.println ("You have recieved a: D" )

]

It is telling me that I have an illegal start to an expression?
In the video the guy is opening his expression with appears to be a "[".

Does anyone see anything wrong here, correction/advice would be a great help.

Thank you
 
I don't recall using square brackets in Java, you should probably start there.

Also there appears to be no end curly bracket to your main()
 
Back
Top Bottom