
Day 11

Quiz
•
Education
•
1st - 5th Grade
•
Hard
DATTA SAI SANTHOSH
Used 3+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the difference between method overloading and method overriding?
Method overloading is static polymorphism, while method overriding is dynamic polymorphism.
Method overloading is used in inheritance, while method overriding is used in abstraction.
Method overloading is when a subclass provides a different implementation of a method, while method overriding is when a subclass has multiple methods with the same name.
Method overloading is used for access control, while method overriding is used for code reusability.
Answer explanation
Method overloading is static polymorphism, while method overriding is dynamic polymorphism
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is not a benefit of using packages in Java?
Encapsulation and information hiding
Improved code reusability
Easy management of large projects
Faster execution of Java programs
Answer explanation
Faster execution of Java programs
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is/are not advantages of packages?
packages avoid name clashes.
classes even though they are visible outside their package, can have visible to packages only
we have hidden classes that are used by the packages, but not bisible outside.
all the above
Answer explanation
classes even though they are visivle outside theor package,can have visible to packages only
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
// Note static keyword after import.
import static java. lang. System.*;
class StaticImportDemo
{
public static void main(String args[])
{
out.println("wipro training");
}
}
Wipro training
compile Error
Runtime error
None of the above
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword is used to establish inheritance in Java?
inherits
extends
inheritsFrom
implements
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Predict the output of the following program.?
abstract class demo
{
public int a;
demo()
{
a = 10;
}
abstract public void set();
abstract final public void get();
}
class Test extends demo
{
public void set(int a)
{
this.a = a;
}
final public void get()
{
System.out.println("a = " + a);
}
public static void main(String[] args)
{
Test obj = new Test();
obj.set(20);
obj.get();
}
}
Compilation error
a=10
a=20
Runtime error
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Can an interface contain variables?
Yes, only static variables.
Yes, only final variables.
No, interfaces cannot have variables
Yes, but they must be final and static.
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Entendendo API e JSON

Quiz
•
3rd Grade - University
10 questions
Moringa JavaScript Arrays

Quiz
•
5th Grade - Professio...
15 questions
Общие сведения о языке программирования Python

Quiz
•
5th Grade
10 questions
Итоговый 8 класс

Quiz
•
1st - 10th Grade
13 questions
Construct3

Quiz
•
2nd - 3rd Grade
18 questions
Fundamentos de JavaScript para Iniciantes

Quiz
•
2nd Grade
15 questions
RBT F3

Quiz
•
1st Grade - Professio...
11 questions
What are human rights?

Quiz
•
5th Grade
Popular Resources on Wayground
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World

Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
20 questions
ELA Advisory Review

Quiz
•
7th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns

Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Education
24 questions
CKLA Unit 2 Test

Quiz
•
5th Grade
5 questions
Theme Practice

Lesson
•
3rd Grade
11 questions
Practice Mini-Test – Unit 2: Place Value & Measurement

Quiz
•
5th Grade
7 questions
Combining Sentences and Sentence Structure

Quiz
•
4th Grade
11 questions
Wonder Chapters 1-12

Quiz
•
5th Grade
24 questions
Sadlier Unit 4 Vocabulary Orange

Quiz
•
4th Grade
24 questions
Sadlier Unit 3 Vocabulary Orange

Quiz
•
4th Grade