Unit 1 · Using Objects and Methods
Integer Division and Mod
Integer Division and Mod MCQ Practice
Question 1 of 15
Answered 0 of 15
Choose one answer.
What is printed by the following code segment?
public class IntegerDivisionAndModContext
{
public static void runExample()
{
int n = 5;
for (int i = 3; i < 7; i++)
{
System.out.print(i % n);
}
}
public static void main(String[] args)
{
runExample();
}
}