
Day 11
Authored by DATTA SAI SANTHOSH
Education
1st - 5th Grade
Used 3+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
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.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
Class-5 EVS ( EXPERIMENTS WITH WATER)
Quiz
•
5th Grade
13 questions
Cyberbullying and Cyber safety
Quiz
•
5th Grade
14 questions
COOPERATION AMONG DIVERSE TRIBES&CULTURES
Quiz
•
4th Grade
20 questions
PKWU
Quiz
•
3rd Grade
12 questions
N5 BM - Operations
Quiz
•
4th Grade
10 questions
Java Strings
Quiz
•
1st Grade - Professio...
10 questions
Tipos de Datos y Operadores Python
Quiz
•
1st Grade
12 questions
Siguranta pe internet!
Quiz
•
4th - 12th Grade
Popular Resources on Wayground
8 questions
Spartan Way - Classroom Responsible
Quiz
•
9th - 12th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
14 questions
Boundaries & Healthy Relationships
Lesson
•
6th - 8th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
3 questions
Integrity and Your Health
Lesson
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
9 questions
FOREST Perception
Lesson
•
KG
20 questions
Main Idea and Details
Quiz
•
5th Grade
Discover more resources for Education
10 questions
Deep Down and Other Extreme Places to Live
Quiz
•
3rd Grade
15 questions
Homophones
Quiz
•
3rd Grade
16 questions
Equivalent Fractions
Quiz
•
5th Grade
10 questions
Colonies Vocab #2
Quiz
•
3rd Grade
6 questions
change y to i add est & er
Quiz
•
2nd Grade
16 questions
Money
Quiz
•
2nd Grade
8 questions
Unit 5 week 3: wonders vocab 2nd grade
Quiz
•
2nd Grade
12 questions
3rd Grade Editing and Revising Practice Quiz
Quiz
•
3rd Grade