Example to make public java boolean type and result in boolean data

   1. What does java boolean mean?

    Java boolean mean returns a value which is defined as a true/false value.  We usually use java boolean type to check whether a statement is right or wrong. 

          Here i create a function which is called flip.
example-to-make-public-java-boolean-type-and-result-in-boolean-data
        In the flip method, the return value will be a true (false) value, and it is determined by the return Boolean type.  A boolean type parameter will be passed into the method.  This’s determined by the second Boolean type in the parentheses.
example-to-make-public-java-boolean-type-and-result-in-boolean-data-2
In the main, we make a constructor in the first line.  After that we create a parameter which is called num by a Boolean type then pass it into the flip method by the syntax (booleanFlip.flip(num)), and the System.out.println before is used to print out the result. 
        Finally, we have in cmd commands:
example-to-make-public-java-boolean-type-and-result-in-boolean-data-1

To find out about Point class in java:

Comments