Quiz for Module3

Quiz for Module3

Professional Development

20 Qs

quiz-placeholder

Similar activities

classes & static keyword

classes & static keyword

Professional Development

22 Qs

Day 4 - Advanced Topics

Day 4 - Advanced Topics

Professional Development

20 Qs

day5

day5

Professional Development

21 Qs

Basic JavaScript

Basic JavaScript

Professional Development

15 Qs

Javascript Assessment

Javascript Assessment

Professional Development

20 Qs

LET Review

LET Review

Professional Development

15 Qs

Servlets

Servlets

Professional Development

20 Qs

Java Introduction

Java Introduction

Professional Development

22 Qs

Quiz for Module3

Quiz for Module3

Assessment

Quiz

Professional Development

Professional Development

Hard

Created by

kodida priya

Used 64+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Suppose A is an abstract class, B is a concrete subclass of A. Both A and B have a default constructor.

Which of the following options are correct?

1. A a = new A();

2. A a= new B();

3. B b = new A();

4. B b= new B();

1 and 2

2 and 4

3 and 4

1 and 3

2.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

Predict the output:

a=10

a=20

Compilation Error at Line 3 : Constructor name should be same as that of class name.

Compilation Error at

Line 7 : Method cannot be both abstract and final,

Line 13 : Cannot override the final method.

3.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

Predict the output:

welcome

10

20

Error in Line 2 : Modifier static not allowed here.

Error in Line 7: Modifier static not allowed here.

Compilation Error in both Line 2 and Line 7.

4.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

Which one of the below options is correct as per the given piece of code?

SIMRAN

Compilation error : Final variable should be initialized before starting the execution.

Compilation error : Java does not allow final keyword before the constructor.

Compilation error : this keyword cannot be used with final variable.

5.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

Predict the output:

Application Successful

Application Successful

Method C

Compilation Error at Line 7 : Cannot extend multiple interfaces.

Compilation Error at Line 10 : Add unimplemented methods.

6.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

Identify the lines that can be replaced at /*Insert code here.*/ in the given code to display 100 successfully:

1. Testable.testValue;

2. Test.Testable.testValue;

3. Test.testValue;

4. new Test().testValue;

Option 1 and 2.

Option 2 and 3.

Option 1, 3 & 4.

All the four options.

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

Predict the output:

NullPointerException

9

5

None of the above

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?