
CHAPTER 1 - CHAPTER 5
Quiz by Ainin Sofiya Hisham
Feel free to use or edit a copy
includes Teacher and Student dashboards
Measure skillsfrom any curriculum
Tag the questions with any skills you have. Your dashboard will track each student's mastery of each skill.
- edit the questions
- save a copy for later
- start a class game
- automatically assign follow-up activities based on students’ scores
- assign as homework
- share a link with colleagues
- print as a bubble sheet
- Q1
OOP stands for _____
Objection Orientation Programming
Object Orientation Program
Objected Oriented Programmer
Object Oriented Programming
30s - Q2
What is the extension of java code files?
.js
.class
.java
.txt
30s - Q3
Which of the following is not an OOPS concept in Java?
Compilation
Inheritance
Encapsulation
Polymorphism
30s - Q4
public class MyClass {
_________ static void _________ (String[] args) {
System.out.println("Happy Holiday, DSET 2 SEM 3");
}
}
your format answer should be (xxxx,yyyy)
Users enter free textType an Answer30s - Q5
String syntax in JAVA is used for ______
stores floating point numbers, with decimals, such as 19.99 or -19.99
stores single characters, such as 'a' or 'B'. Char values are surrounded by single quotes
stores integers (whole numbers), without decimals, such as 123 or -123
stores values with two states: true or false
stores text, such as "Hello". String values are surrounded by double quotes
30s - Q6
integer syntax is used to stores integers (whole numbers), without decimals, such as 123 or -123
truefalseTrue or False30s - Q7
String className = "John";
System.out.println(___________)
Fill in the correct variables.
Users enter free textType an Answer30s - Q8
What will be the output of the following Java code?
class box
{
int width;
int height;
int length;
}
class main
{
public static void main(String args[])
{
box obj = new box();
obj.width = 10;
obj.height = 2;
obj.length = 10;
int y = obj.width * obj.height * obj.length;
System.out.print(y);
}
12
200
400
200
30s - Q9
Which of the following is a superclass of every class in Java?
ArrayList
Object class
Abstract class
String
30s - Q10
Which of these keywords are used for the block to be examined for exceptions?
try
throw
catch
check
30s - Q11
Which one of the following is not an access modifier?
Public
Protected
Void
Private
30s - Q12
subclass is the class that inherits from another class.
truefalseTrue or False30s - Q13
superclass (parent) - the class that inherit from another class
falsetrueTrue or False30s - Q14
import java.io.*;
class Addition {
public static void main(String[] args) { // initializing variables
int num1 = 10, num2 = 20, sum = 0; // Displaying num1 and num2
System.out.println("num1 = " + num1);
System.out.println("num2 = " + num2); // adding num1 and num2
sum = num1 + num2;
System.out.println("The sum = " + sum); }}
What is the expected output?
10
20
30
num1 = 20
num2 = 20
The sum = 40
num1 = 10
num2 = 20
The sum = 30
20
40
60
45s - Q15
public class Main {
public static void main(String[] args) {
System.out.println(10 > 9); // returns true, because 10 is higher than 9 } }
What is the output of this code?
truefalseTrue or False30s