
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
Lesson 42 - file related functions

Quiz
•
5th Grade
17 questions
HTML ask F1

Quiz
•
1st Grade
10 questions
Pengetahuan Umum

Quiz
•
1st - 5th Grade
10 questions
Dynamic Data Extraction Quiz

Quiz
•
3rd Grade - University
11 questions
STEM SMK PEDAS - DRONE

Quiz
•
1st Grade
10 questions
Competitive Programming

Quiz
•
1st Grade
20 questions
Python st.1

Quiz
•
1st Grade
10 questions
INTRODUCTION

Quiz
•
1st Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Education
6 questions
Key Shifts and Strategies Poll

Quiz
•
1st - 5th Grade
10 questions
TCI Unit 1- Lesson 3

Quiz
•
5th Grade
20 questions
Fragments and Run-Ons

Quiz
•
4th Grade
10 questions
The Year We Learned to Fly

Quiz
•
1st - 5th Grade
16 questions
Gingerbread for Liberty

Quiz
•
2nd Grade
24 questions
Sadlier Unit 3 Vocabulary Orange

Quiz
•
4th Grade
21 questions
Author's Purpose

Quiz
•
5th Grade
15 questions
Reducing Fractions

Quiz
•
5th Grade