Visual Basic .NET <-> Java | Logical negation
Visual Basic .NET Used keywords: not
not
Description
not par1
Input
- par1 - Logical value
Output
- Result - Logical value
Examples
Visual Basic .NET
In the source code you can find the equivalent of the above table, for easier orientation at the end of each line is a comment which shows the result.a1 = not false ' a1 = true
a2 = not true ' a2 = false
Visual Basic .NET
Even one example in what situations we can use the operation logical negation:not a
not b and true
not(10 >a or a<5)
.
Java Used keywords: !
!
Description
! par1
Input
- par1 - Logical value
Output
- Result - Logical value
Examples
Java
In the source code you can find the equivalent of the above table, for easier orientation at the end of each line is a comment which shows the result.a1 = !false; // a1 = true
a2 = !true; // a2 = false
Java
Even one example in what situations we can use the operation logical negation:!a
!b && true
!(10 >a || a<5)
You can find it in the following collections: logical operators
Logical negation in another programming language:
Differences to: