Grade VIII ICT Final Java Sample Paper
Grade VIII ICT Final Java Sample Paper
General instructions:
1. Read the questions carefully.
2. All the questions are compulsory.
(a) The '%' operator is used to find the _____ of two numbers in Java.
(c) The ‘if’ control structure allows you to execute a block of code only if a _____ is true.
(f) A ________________________ is a named location in the memory, which stores data temporarily.
(j) A_______________ loop is a sequence of instructions which is repeated until the specified condition is
met.
Q3. State True or False and correct the false statement in the next line. [10 x .5 = 5]
________________________________________________________________________________
(ii). Constants are used to store data that remains same throughout the program. ___________
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
(v). The 'void' keyword in Java is used to specify that a method does not return any value. ___________
________________________________________________________________________________
________________________________________________________________________________
(vii). Every statement in java ends with a ‘.’ (full stop). ___________
________________________________________________________________________________
(viii). The command line ‘String Args’ can be used in both the ways: String[] args
________________________________________________________________________________
(ix). An ‘if’ statement must always be followed by an else block in Java. ___________
________________________________________________________________________________
________________________________________________________________________________
Q4. Write the code in Java for the following statements: (Any three) [3 x 1 = 3]
________________________________________________________________________________
(ii). Apply the condition to check whether the product of ‘a’ and ‘b’ variables is more than the variable
‘n’.
_______________________________________________________________________________
________________________________________________________________________________
(iv). Use ‘for’ loop statement to display the output of numbers 10-1 in a single line.
________________________________________________________________________________
________________________________________________________________________________
******************************************************************************************