Search Header Logo

Package & Interfaces

Authored by Goutam Dhar

Computers

5th Grade

Used 20+ times

Package & Interfaces
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

5 mins • 1 pt

Which option is correct for creating a package named s3cs ?

create package s3cs;

package s3cs;

define package 3cs;

s3cs;

2.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

Which is true about package?

packages can appear in a hierarchy.

package help to control the visibility of the program.

package helps to group related classes and interfaces.

All of the above

3.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

To use a class or a package from the library which keyword is used

include

package

import

export

4.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

A class member can be accessed only by a class in the same package. Which is the suitable access specifier?

public

default

private

protected

5.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

A class member cannot be accessed by any other class inside or outside the package. Which is the suitable access specifier?

private

public

default

protected

6.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

Which of the following help to access all the classes in the package p1?

import p1;

import p1.*;

import p1.all;

import p1.A;

7.

MULTIPLE SELECT QUESTION

5 mins • 1 pt

Which of the following help to use class Sample from package adm? (choose all appropriate options)

import admSample;

import adm.Sample;

import Sample;

import adm.*;

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

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?