Search Header Logo

Computer Science Workshop Quiz

Authored by Sankarsan Sahoo

Engineering

University

Used 1+ times

Computer Science Workshop Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is not a type of polymorphism in Java?

Method overloading

Operator overloading

Operator overriding

Method overriding

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which feature of OOPS described the reusability of code?

Abstraction

Encapsulation

Polymorphism

Inheritance

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which collection does not allow duplicate elements?

List

Set

Map

All of the above

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which collection allows you to retrieve elements in the order they were inserted?

HashSet

TreeMap

LinkedHashMap

PriorityQueue

5.

OPEN ENDED QUESTION

3 mins • 1 pt

What is the Output of following Java Program? import java.util.*; class Demo { public static void main(String[] args) { ArrayList arr = new ArrayList(); arr.add(11); arr.add(2); arr.add(3); arr.add(5); arr.add(7); arr.remove(new Integer(7)); arr.remove(2); for (int i = 0; i < arr.size(); i++) System.out.print(arr.get(i) + " "); } }

Evaluate responses using AI:

OFF

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these is an correct way of defining generic method?

name(T1, T2, …, Tn) { /* … */ }

public name { /* … */ }

class name[T1, T2, …, Tn] { /* … */ }

name{T1, T2, …, Tn} { /* … */ }

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following collections is sorted by its natural ordering?

HashMap

TreeMap

LinkedHashMap

Hashtable

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

Already have an account?