Need help with understanding this little bit of code

java

#1

In the example of a ternary statement, the course has this:

int pointsScored = 21;

char gameResult = (pointsScored > 20) ? 'W' : 'L';
System.out.println(gameResult);

What does the question mark do/mean? (pointsScored > 20) ? 'W' : 'L'


#2

Oh nevermind, I've figured it out! Thanks to everyone who was going to try and help me!


#3

I was wondering if you got this if you could help me this figuring this one out.... I am having a hard time finishing this code