Welcome To JavaQuiz.

Learn JAVA by Taking Our Computer Generated Quizzes.

Download pdf version of For-Loop Quiz
Quiz 1: Basic For-Loops

This quiz tests your ability to count the number of iterations of a for loop.

{{q2a}}
  System.out.println("I LOVE JAVA");

How many times is the line "I LOVE JAVA" printed out after the code above executes

The code results in a compilation error
The code successfully compiles and 'I LOVE JAVA' will be printed   times
 
Basic For-Loop Quiz 2

This quiz tests your ability to keep track of how a for loop changes its initializer variable

{{q2b}}
  System.out.print(i);

What is the output of the code below

Intermediate For-Loop Quiz 1

This quiz tests your ability to keep track of how a for loop update the value of a variable

int x = {{q2cv}};
{{q2c}}
  x+=i;
What is the value of x when the code below finishes executing
Intermediate For-Loop Exercises 2

This quiz tests your ability to interpret if statements in a for loop

int x = {{q3av}};
{{q3a}}
  {{q3aif}}
     x+= i;
What is the value of x when the code below finishes executing:

Quiz {{x}}

This application was developed by Louai Rahal in partial fulfillment of the degree of MSc in Computer Science at the University of Hertfordshire

Links to Louai's Social Media Accounts and Email