What will be the result of the expression !!true?
- Compilation Error
- FALSE
- Runtime Error
- TRUE
The expression !!true is a double negation of the boolean value true. It will result in true. The first ! operator negates true to false, and the second ! operator negates false back to true. This is a common way to ensure a boolean value is truly true.
Loading...
Related Quiz
- The method ________ is used to send HTTP GET request without parameters.
- The keyword ________ is used to skip the rest of the current loop iteration.
- What is the purpose of using getters and setters in Java?
- Using ________ before a variable will restrict its visibility to the same class only.
- How does Java restrict a class from being used to create objects?