What does this line mean in Java: boolean retry = id == 1;

id == 1 is a boolean expression which is true if id equals 1, and false otherwise.

boolean retry = id == 1; declares a boolean variable named retry, and assigns the value of the boolean expression id == 1 to this variable.

So it declares a boolean variable which is true if id == 1, and false otherwise.

To make it a bit clearer, you might write it that way:

boolean retry = (id == 1);

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)