
Milestone 1 Quiz WTN

Quiz
•
Computers
•
University
•
Hard
Prema,Asst.Prof, Chennai
Used 1+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which statement is not true about maps?
All keys in a map are unique
The return type of the values() method is a Collection
The Map interface extends the Collection interface
Elements of a LinkedHashMap are ordered by insertion order
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following program:
public class Demo{
public static void main(String args[]){
int variable1 = 10;
do{
if(variable1==10){
break;
}else{
variable1++;
System.out.println(variable1);
}
}while(variable1<10);
}
}
a. 10
b. 11
c. No Output
d. Compilation Error
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
import java.util.*;
public class TestCollection {
public static void main(String args[]) {
Object al = new ArrayList();
Object hs = new HashSet();
Object hm = new HashMap();
System.out.println(String.format("%s,%s,%s", al instanceof Collection, hs instanceof Collection, hm instanceof Collection));
}
}What is the result of attempting to compile and run the program?
false,false,true
true,true,false
true,false,true
true,true,true
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following program:
public class Demo{
public static void main(String args[]){
int[] myArray = {1,2,3,4,5};
for(int counter:myArray){
System.out.println(++counter);
}
}
}
2
3
4
5
6
1
2
3
4
5
No Output
Compilation Error
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given classes A, B, and C, where B extends A, and C extends B, and where all classes implement the instance method void doIt(). How can the doIt() method in A be called from an instance method in C?
super.doIt()
super.super.doIt()
A.this.doIt()
It is not possible
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Using which one of the following keyword we can exclude some object properties from serialization process?
transient
exclude
omit
native
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which statement is true?
Private methods of a superclass cannot be overridden n subclasses
A subclass can override any method present in a superclass
An overriding method can declare that it throws more exceptions than the method it is overriding
The parameter list of an overriding method must be a subset of the parameter list of the method that it is overriding
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
ITBP301_Chapter 01

Quiz
•
University
9 questions
Hashing and Hash Tables

Quiz
•
University
6 questions
Hash table

Quiz
•
University
8 questions
Seguridad en sistemas de información

Quiz
•
University
10 questions
Python Programming Concepts Challenge

Quiz
•
10th Grade - University
6 questions
Kriptografi Cup 2

Quiz
•
University
15 questions
Evaluativo Nº 12 (19/11/2024)

Quiz
•
University
9 questions
Java Basics

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Would you rather...

Quiz
•
KG - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
10 questions
The Constitution, the Articles, and Federalism Crash Course US History

Interactive video
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
16 questions
Water Modeling Activity

Lesson
•
11th Grade - University
10 questions
ACT English prep

Quiz
•
9th Grade - University