+ 1

how to print the statements of a ternary operator with out "System.out.println" statement

suppose that i have a ternary operator like (age>18) ? adult ; not adult please help me !!!!!!!!!!!!!!!!!!!!!!!!

14th Oct 2019, 4:17 PM
Ashutosh Vishwakarma
Ashutosh Vishwakarma - avatar
4 odpowiedzi
+ 3
Where you want to print? Without this you can't print.
14th Oct 2019, 4:21 PM
A͢J
A͢J - avatar
+ 2
Not possible. You need to use it.
14th Oct 2019, 4:42 PM
A͢J
A͢J - avatar
+ 1
on the console or on the teminal
14th Oct 2019, 4:23 PM
Ashutosh Vishwakarma
Ashutosh Vishwakarma - avatar
+ 1
using printwriter maybe ? idk it seems that you missing the point. for ternary operator you usually get task line 'print this with single line' or 'only use println once' something like that.
14th Oct 2019, 5:09 PM
Taste
Taste - avatar