How to use boolean argument in a method with Java

1 Answer

0 votes
public class MyClass {
    static void f(boolean b) {
        System.out.println(b);
    }
    public static void main(String args[]) {
        f(true);
        f(false);
    }
}



/*
run:

true
false

*/

 



answered Sep 9, 2020 by avibootz
...