Java Interface Quiz

Quiz
•
Computers
•
University
•
Hard
Kundan Kumar
Used 2+ times
FREE Resource
9 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword is used to implement an interface in Java?
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output of this code?
Compilation error
Method A
Runtime error
No output
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What happens if a class implements an interface but does not provide implementations for all of its methods?
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the default access modifier for methods declared in an interface?
private
public
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which of the following is true about interfaces in Java?
Interfaces can contain method signatures and static final variables, but cannot contain method implementations.
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What keyword is used to inherit from a class and to implement an interface in Java?
inherit, derive
extends, extends
extends, implements
implements, extends
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which of the following is true regarding multiple inheritance in Java?
8.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which of the following correctly distinguishes a class from an interface in Java?
Both classes and interfaces can have constructors
Only interfaces can have constructors
Only classes can have constructors
Neither classes nor interfaces can have constructors
9.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Why can’t interfaces have constructors in Java?
Similar Resources on Wayground
10 questions
java quiz on Encapsulation and Abstraction

Quiz
•
University
10 questions
OOP Concept Java

Quiz
•
University
8 questions
Pacotes Java

Quiz
•
University
10 questions
Java Quiz

Quiz
•
University
10 questions
Java Quiz

Quiz
•
University
10 questions
Talent Next Java MCQ-1

Quiz
•
University
10 questions
AITT LAB QUIZ 4

Quiz
•
University
10 questions
Java Quiz 1

Quiz
•
University
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade