
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
11 questions
Reading Bank 6
Quiz
•
4th Grade
20 questions
Site Safety Revision
Quiz
•
4th - 6th Grade
18 questions
Transportation
Quiz
•
1st Grade - Professio...
18 questions
Quiz Proxy Server
Quiz
•
3rd Grade
10 questions
kondisi geografi Indonesia
Quiz
•
4th - 6th Grade
15 questions
Quiz no. 1 Filipino 5
Quiz
•
4th - 6th Grade
20 questions
RBT T3 mekatronik
Quiz
•
3rd Grade
20 questions
Ishy Bilady UAE Quizzz
Quiz
•
4th - 5th Grade
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Education
10 questions
Ivan Vocab 6
Quiz
•
3rd Grade
6 questions
Milton Hershey
Quiz
•
3rd Grade
16 questions
Equivalent Fractions
Quiz
•
5th Grade
10 questions
TELPAS Reading Practice
Quiz
•
4th Grade
20 questions
Fractions with Unlike Denominators
Quiz
•
5th Grade
15 questions
Capitilization
Quiz
•
3rd Grade
10 questions
STAAR POETRY
Quiz
•
4th Grade