My Java Quiz

The ultimate place to learn Java!

Question #14: What will be the result of running this code?

public class Test {

  static boolean printAndReturn(boolean value) {
    System.out.println(value);
    return value;
  }

  public static void main(String[] args) {
    if (printAndReturn(false) && printAndReturn(true)) {
      System.out.println(true);
    } else {
      System.out.println(false);
    }
  }

}