It's the night before the Assistant Programmer paper. A page of code is open in front of you, and one line says int x = 7 / 2;. Two answers tug at you, 3 and 3.5. You half remember a rule about whole numbers, and the half you don't remember is exactly the part that costs a mark. A revision sheet is for that night.
This sheet gives you the whole Programming Concepts course back in about twenty-five minutes: what to know cold, what the exams ask most, and where people lose marks. Read a block, and when a line feels unfamiliar, tap its link and re-read that part of the lesson, then try the check that ends each part.
Why it matters: The past questions our lessons cite in this course number 778 (335 MCQ and 443 written), from 259 papers. The earliest paper is from 2013, the latest from 2026, and 157 of the questions come from papers of 2024 or later.
Question (Combined Bank — Assistant Programmer — Exam: 09.02.2024 (BIBM)): What is the output of this Java program?
class Test{
int i=1;
}
public class main{
public static void main(String args[]){
Test t;
System.out.println(t.i);
}
}
a) The program will cause a runtime exception because the variable 'i' was not initialized
b) The program will cause a compile error because the object 't' was not initialized
c) 0
d) A garbage value