
Exception, Abstraction

Quiz
•
Engineering
•
University
•
Hard
Arti Sonawane
Used 1+ times
FREE Resource
7 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of an abstract method?
To define static behavior
To hide all functionality
To provide a method without implementation
To override superclass method
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What type of exception is NullPointerException?
Checked
Unchecked
Compile-time
Custom
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword is used to manually throw an exception?
throws
throw
exception
raise
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is true about interfaces in Java?
interfaces cannot have methods
interfaces can have constructors
interfaces can have static and default methods
Interface methods are private by default
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is true about abstract classes in Java?
An abstract class can be instantiated
An abstract class cannot have any method
An abstract class can have both abstract and non-abstract methods
All methods in an abstract class must be abstract
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is not true about static methods?
They can access only static variables directly
They can call non-static methods directly
They belong to the class, not objects
They can be called without creating an object
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Can an abstract method be private?
Only if the class is final
Only in interfaces
yes
no
Similar Resources on Wayground
5 questions
Smart Buildings Lecture 2

Quiz
•
University
10 questions
AFM SMILER Exercise 1-4

Quiz
•
University
6 questions
Let's play!

Quiz
•
University
10 questions
Power Management in IoT Devices

Quiz
•
University
11 questions
Pressure Sensor Quiz

Quiz
•
University
6 questions
Understanding Python Classes and Objects

Quiz
•
University
10 questions
OOP_1

Quiz
•
University
10 questions
Surveying I Quiz

Quiz
•
University
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade