What is the main purpose of encapsulation?

OOP Quiz for Level 2 Undergraduates

Quiz
•
Computers
•
Professional Development
•
Medium
Ms. Yehemini Jayatissa - University of Kelaniya
Used 1+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Code duplication
Hiding internal details
Increasing complexity
Public access to variables
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following allows runtime polymorphism in Java?
Method Overloading
Constructor Overloading
Method Overriding
Final methods
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What keyword is used to inherit a class in Java?
import
extend
this
implements
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of: System.out.println(10 > 5 && 3 < 2);
true
false
10
Compile error
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which access modifier allows access only within the same class?
public
protected
private
default
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is abstraction in OOP?
Hiding data
Hiding logic
Hiding implementation details and showing only functionality
Hiding methods
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which statement is used to catch exceptions?
try-catch
throw
throws
if-else
Create a free account and access millions of resources
Similar Resources on Quizizz
20 questions
Ch.8 - Introducing Python

Quiz
•
6th Grade - Professio...
20 questions
City & Guilds Level 3 Apprenticeship Coding and Logic

Quiz
•
Professional Development
17 questions
Java Basics

Quiz
•
Professional Development
16 questions
Final Assessment

Quiz
•
Professional Development
20 questions
LOOPS in OOPS

Quiz
•
Professional Development
17 questions
Computational Thinking

Quiz
•
Professional Development
15 questions
JavaScript

Quiz
•
Professional Development
16 questions
CIW IBA Lesson 6 Vocabulary

Quiz
•
8th Grade - Professio...
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
5 questions
capitalization in sentences

Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance

Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions

Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines

Quiz
•
Professional Development
12 questions
Dividing Fractions

Quiz
•
6th Grade