Which statement is not true about maps?

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
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 Quizizz
14 questions
Java Operators

Quiz
•
University
12 questions
javaquizvivek

Quiz
•
University
10 questions
Java Control Flow statements

Quiz
•
University
13 questions
Intro to IF statements

Quiz
•
KG - University
10 questions
java operators

Quiz
•
University
11 questions
Array

Quiz
•
University
15 questions
Array Java

Quiz
•
University
10 questions
Variablen und Vergleiche

Quiz
•
University
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade