DataOnly dataOnly = new DataOnly(); boolean bool = dataOnly.aBoolean = false; // first example System.out.println(dataOnly.aBoolean = false); //second example 

Closed due to the fact that it is necessary to reformulate the question so that it was possible to give an objectively correct answer to the participants of Regent , Eugene Krivenja , iksuy , gil9red , MedvedevDev Oct 20 '17 at 17:11 .

The question gives rise to endless debates and discussions based not on knowledge, but on opinions. To get an answer, rephrase your question so that it can be given an unambiguously correct answer, or delete the question altogether. If the question can be reformulated according to the rules set out in the certificate , edit it .

    1 answer 1

    System.out.println ("" + bool)

    • I mean, you can immediately use System.out.println (......), or shove it into a variable and then output it? - Alexander Kukhtin
    • It’s possible to always assign it to variables. The code is clean - elik
    • Therefore, do as I showed, shove it in a boule, and bring out the boules already - elik
    • one
      Thumb up answer for +) if you write something and remember to keep the main code clean. And I’m learning about logging, and then systems out print it is not for that)))) - elik