UNIT Java Programming - Quizizz
UNIT Java Programming - Quizizz
Worksheets Name
Java Programming
Class
Total questions: 20
Worksheet time: 12mins
Date
Instructor name: Imran Khan
a) C) B b) B) A
c) D) 65 d) A) 66
4. Which type of loop is best known for its boolean condition that controls entry to the loop?
c) C. for-each d) D. while
https://quizizz.com/print/quiz/62fe0490cc9698001e350e54 1/5
2/23/24, 12:56 PM Java Programming | Quizizz
a) b) Error b) d) Hii
c) a) Nothing d) C) Finite
a) False b) True
a) char b) int
8. What data type would you use for storing the number of students in a class?
a) double b) String
c) int d) boolean
a) Real b) Integer
c) Character d) String
a) A) 66 b) D) 65
c) C) B d) B) A
https://quizizz.com/print/quiz/62fe0490cc9698001e350e54 2/5
2/23/24, 12:56 PM Java Programming | Quizizz
a) B. 0 b) A. 5
c) C. 4 d) D. Compilation Error
12. Function of the Scanner class to accept a float literal from the user is
a) next( ) b) hasNext( )
c) nextInt( ) d) nextFloat( )
a) 20 b) 21
c) 11 d) 22
a) Runnable b) sleep
c) terminated d) New
15. Which of the following key word is optional in Exception handling program
a) finally b) throw
c) catch d) try
a) Bug occurred during the compile time of a b) Error occurred during the execution of a
program program
https://quizizz.com/print/quiz/62fe0490cc9698001e350e54 3/5
2/23/24, 12:56 PM Java Programming | Quizizz
int number = 89 / 0;
System.out.println("The answer is " + number);
a) NumberFormatException b) ArithmeticException
c) NullPointerException d) ArrayIndexOutOfBoundException
a) BC b) A
c) B d) AC
https://quizizz.com/print/quiz/62fe0490cc9698001e350e54 4/5
2/23/24, 12:56 PM Java Programming | Quizizz
c = ++b;
d = a++;
c++;
c) a = 2 b = 3 c = 4 d = 1 d) a = 1 b = 2 c = 4 d = 2
https://quizizz.com/print/quiz/62fe0490cc9698001e350e54 5/5