Java Relational Operators Question 1

Question

What is the output of the following code?

public class Main {
  public static void main(String[] args) {
    int i = 1, j = 2, k = 3, m = 2;

    System.out.println(i == 1);/*  www  . j  a  v a  2  s . c  o m*/
    System.out.println(j == 3);
    System.out.println((i >= 1) && (j < 4));
    System.out.println((m <= 99) & (k < m));
    System.out.println((j >= i) || (k == m));
    System.out.println((k + m < j) | (3 - j >= k));
    System.out.println(!(k > m));
  }
}


true
false
true
false
true
false
false



PreviousNext

Related