A
A
Artyom Pinul2016-03-27 04:00:30
Java
Artyom Pinul, 2016-03-27 04:00:30

True or False is that the question?

if ( 1 > 0 ? false : true) { print 'true' } else { print 'false' }
What will it output? True or False?
Please explain if possible.)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey, 2016-03-27
@Focster

1 > 0 ? false : true - if 1 > 0, then return false
if (false) { ... } else { print 'false'; } - prints 'false' since the condition is false

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question