Given:
What is the resulting output?
isAvailable starts as false. The first print outputs false. doStuff() returns the negation of that value, true, which is assigned back to isAvailable; the final println outputs true. Calling a static method through an instance is permitted by Java, although class-name access is preferred.
isAvailable
false
print
doStuff()
true
println
Community Discussion