I have method printB()
:
private static final void printB () {
System.out.println(Boolean.TRUE);
System.out.println(Boolean.FALSE);
}
and I have class
public class ChangeBooleanValue {
public static void main(String[] args) {
// Add code
printB();
}
private static final void printB () {
System.out.println(Boolean.TRUE);
System.out.println(Boolean.FALSE);
}
}
I want to write code instread of // Add Code
so that the output will be:
true
true
or
false
false
I know that it is possible using by some Java tricks.