
Unit-2 Revision quiz

Quiz
•
Professional Development
•
Professional Development
•
Medium
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
Similar Resources on Wayground
27 questions
36.Stub Void Methods Explicitly

Quiz
•
Professional Development
20 questions
ERM - Written Exam - Star Assistant

Quiz
•
Professional Development
21 questions
Fundamental Literacy and Numerology

Quiz
•
Professional Development
20 questions
HAVE TO / DON'T HAVE TO / MUST / MUSTN'T

Quiz
•
Professional Development
22 questions
Units 1 & 2 - Review

Quiz
•
Professional Development
20 questions
eLearning Quiz

Quiz
•
Professional Development
20 questions
SAMR for STAFF @ PRSS

Quiz
•
Professional Development
23 questions
Phase 1 Management: Develop Essential Routines and Procedures

Quiz
•
Professional Development
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade