Unit 3

Unit 3

University

10 Qs

quiz-placeholder

Similar activities

Stored Procedure, Function & Packages

Stored Procedure, Function & Packages

University

15 Qs

Examen Unidad VI. Archivos

Examen Unidad VI. Archivos

University

10 Qs

P1_APLab2Quiz_B3B4

P1_APLab2Quiz_B3B4

University

10 Qs

ISAC Weekly Quiz SEM2 #3

ISAC Weekly Quiz SEM2 #3

University

15 Qs

CSC305: TOPIC 6

CSC305: TOPIC 6

University

15 Qs

javaquizvivek

javaquizvivek

University

12 Qs

Costruttori

Costruttori

University

9 Qs

Unit 3

Unit 3

Assessment

Quiz

Computers

University

Hard

Created by

Mr. V

Used 1+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

1.      Packages in Java are used for:

Improving code readability

Grouping related classes and interfaces

Reducing code complexity

All of the above

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

2.      Which keyword is used to import a specific class from a package in Java?

include

require

import

use

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

3.      In Java, a class can belong to:

Only one package

Multiple packages

No package at all

Two packages only

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

4.      An interface in Java can contain:

Instance variables

Constructors

Abstract methods

All of the above

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

5.      A class in Java can implement multiple interfaces:

True

False

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

6.      Which access modifier is used for an interface method that should be accessible only within the same package?

public

protected

private

default (package-private)

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

7.      Which keyword is used to explicitly throw an exception in Java?

exception

throw

catch

try

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?