eight nine ten ten

eight nine ten ten

41 Qs

quiz-placeholder

Similar activities

Test28OCT

Test28OCT

University

36 Qs

Quiz_29.03.2023

Quiz_29.03.2023

Professional Development

41 Qs

X MM PEMOGRAMAN DASAR RABU

X MM PEMOGRAMAN DASAR RABU

10th Grade

40 Qs

eight nine ten ten

eight nine ten ten

Assessment

Quiz

Professional Development

Hard

Created by

NUrken AtAbAy

FREE Resource

41 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Which are true about a static nested class? (Choose all that apply.)

A. You must have a reference to an instance of the enclosing class in order to instantiate it

B. It does not have access to non-static members of the enclosing class

C. Its variables and methods must be static

D. If the outer class is named MyOuter, and the nested class is named MyInner, it can be instantiated using new MyOuter.MyInner();

E. It must extend the enclosing class

2.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Media Image

Which create an anonymous inner class from within class Bar? (Choose all that apply.)

A. Boo f = new Boo(24) { };

B. Boo f = new Bar() { };

C. Boo f = new Boo() {String s; };

D. Bar f = new Boo(String s) { };

E. Boo f = new Boo.Bar(String s) { };

3.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Which are true about a method-local inner class? (Choose all that apply.)

A. It must be marked final

B. It can be marked abstract

C. It can be marked public

D. It can be marked static

E. It can access private members of the enclosing class

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the result?

A. An exception occurs at runtime

B. true

C. fred

F. Compilation fails because of an error on line 8

G. Compilation fails because of an error on a line other than 3, 4, or 8

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the result?

A. An exception occurs at runtime at line 10

B. Zippo

C. Compilation fails because of an error on line 3

D. Compilation fails because of an error on line 9

E. Compilation fails because of an error on line 10

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the result?

A. 57 22

B. 45 38

C. 45 57

D. An exception occurs at runtime

E. Compilation fails

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Which, inserted independently at line 6, compile and produce the output "spooky"? (Choose all that apply.)

A. Sanctum s = c.new Sanctum();

B. c.Sanctum s = c.new Sanctum();

C. c.Sanctum s = Cathedral.new Sanctum();

D. Cathedral.Sanctum s = c.new Sanctum();

E. Cathedral.Sanctum s = Cathedral.new Sanctum();

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?