Question from the Java - Fundamentals test

Write a Java program to print the remainder of a number divided by 2.

Archived

Given this code :

public static void main(String[] args){
    int a = 2;
    a + = 2;
    System.out.println(a% 2);
}

What will be displayed in the console?

Author: PierreStatus: Archived(New question!)Question passed 1130 times
2
Community EvaluationsNo one has reviewed this question yet, be the first!