джава

джава

Assessment

Quiz

Other

University

Medium

Created by

Maga Med

Used 1+ times

FREE Resource

Student preview

quiz-placeholder

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

44)  What will be the output of the following Java code?

Error

Hello

36

Hello 36

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

44)   Encapsulation is related to:

Inheritance

Polymorphism

Data hiding

Code optimization

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

44)  Encapsulation promotes the use of which access modifier for class attributes that should not be directly accessed from outside the class?

public

protected

package-private (default)

private

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

44)  What Is an Unbounded Wildcard?

List<?> wildcardList = new ArrayList<String>();

public static void addDogs(List<? super Animal> list) { list.add(new Dog("tom")) }

   public static void makeLotsOfNoise(List<? extends Animal> animals) { animals.forEach(Animal::makeNoise); }

none

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

44)  What Is a Lower Bounded Wildcard?

List<?> wildcardList = new ArrayList<String>();

public static void addDogs(List<? super Animal> list) { list.add(new Dog("tom")) }

public static void makeLotsOfNoise(List<? extends Animal> animals) { animals.forEach(Animal::makeNoise); }

none

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

44)  What Is an Upper Bounded Wildcard?

  List<?> wildcardList = new ArrayList<String>();

public static void addDogs(List<? super Animal> list) { list.add(new Dog("tom")) }

public static void makeLotsOfNoise(List<? extends Animal> animals) { animals.forEach(Animal::makeNoise); }

none

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

44)  In method overriding, which keyword is used to explicitly indicate that a method is intended to override a superclass method?

 

new

override

extends

super

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?