Unit-2 Revision quiz

Unit-2 Revision quiz

Professional Development

25 Qs

quiz-placeholder

Similar activities

Induction Series-Assessment

Induction Series-Assessment

Professional Development

20 Qs

PSUEDOCODE 2 CAPGEMINI

PSUEDOCODE 2 CAPGEMINI

Professional Development

25 Qs

AIML TECH TRIATHLON

AIML TECH TRIATHLON

Professional Development

30 Qs

U 5-6 Top Notch Fundamentals

U 5-6 Top Notch Fundamentals

Professional Development

20 Qs

Servlets

Servlets

Professional Development

20 Qs

AUT104 Week 4 Quiz Suspension Theory

AUT104 Week 4 Quiz Suspension Theory

Professional Development

20 Qs

dup25/09/2020

dup25/09/2020

Professional Development

20 Qs

TECHNOSTORM 2K22 R1 ( BATCH 4 )

TECHNOSTORM 2K22 R1 ( BATCH 4 )

Professional Development

30 Qs

Unit-2 Revision quiz

Unit-2 Revision quiz

Assessment

Quiz

Professional Development

Professional Development

Medium

Created by

Ms STAFF

Used 5+ times

FREE Resource

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which one is correct declaration for implementing two interfaces?

class C implements A, B {}

class C implements A, implements B {}

class C implements A extends B {}

class C extend A, B {}

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

which type of inheritance is not allowed in java directly

Multi level

Multiple

Hierarhical

single

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Suppose the class Undergraduate extends the class Studentwhich extends the class Person. Given the following variable declaration:

Person p = new Person();

Student s = new Student();

Undergraduate ug = new Undergraduate();

Which of the following assignments are legal?

p =ug;

p = newUndergraduate();

ug = newStudent();

ug =p;

s = newPerson();

I andIV

III, II andIV

I and II

III andIV

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the result of this code will be?

Interface A {

inti =111;

}

class B implements A { void methodB(){

i =222;

System.out.printl(i);

}

}

There is no main () method so the program is notexecutable.

The value of i will be printed as 111, as it is static and final bydefault.

The value of i will be printed as 222, as it is initialized in classB.

Compile timeerror

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

which keyword is used to inherit the properties from a class

impements

extends

final

static

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Can we inherit all the properties from parent class

yes all the propeties canbe inherited

yes all the properties except private property

yes all the properties except protected property

yes all the properties except default property

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Multiple inheritances in java can be achieved in java using

packages

classes

interfaces

none

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?