AP Computer Science A Question of the Day

Daily challenge for AP Computer Science A. Test yourself and track progress.

Suppose you have the following code:

public static void main(String<u></u> args) {

int a =2;

if (a%2==0)

System.out.println("Hello World");

else

System.out.println("Hi");

}

If the main method is called, what will be printed?

Select an answer and click Check.