-1

I want to know whether it is possible to negate the expression in ballerina like

(not expression)

or

(!expression)

Inthirakumaaran
  • 369
  • 1
  • 8

1 Answers1

3

Yes, you could simply use (!expression).

boolean test = true;

if (!test){
    io:println(test);
} else {
    io:println(!test);
}
Dinu94
  • 165
  • 1
  • 12