Confusion in exercise

else if ( !(true == true) )
what it mean in java ?

Hey there! I think you already know what the else if -statement does.
Let’s look at the condition that will be met:

( ! (true == true) )
  2          1

1.) Here we check if true is equal to true, which it is.
2.) Here we see an exclamation mark, the not-operator. This means that whatever is the return of the preceding block ( (true == true) ) is, will be inverted. But this goes for booleans only.

Example:

!true = false
!false = true

( (1 + 1) == 2 )  -> true
!( (1 + 1) == 2 ) -> false
1 Like

thanks it’s clear all confusion

I’m happy to hear that!