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 !!!!!!!!!!!!!!!!!!!!!!!!

10/14/2019 4:17:36 PM

Ashutosh Vishwakarma

4 Answers

New Answer


Where you want to print? Without this you can't print.


Not possible. You need to use it.


on the console or on the teminal


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.