stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
OOP(Encapsulation-Inheritance)&Static Members Flashcards | StudBud
Explore
/
OOP(Encapsulation-Inheritance)&Static Members
Inheritance is a way to
Constructors never have an explicit return type
OOP(Encapsulation-Inheritance)&Static Members
12 terms
·
StudBud Administration
·
55 plays
#oop
Flashcards
12 cards
F
Practice quiz
P
Host live
L
Questions
12
Answers
1
Constructors never have an explicit return type
False
True
2
Inheritance is a way to
organize data
pass arguments to objects of classes
add features to existing classes without rewriting them
improve data-hiding and encapsulation
3
Can we overload static methods in Java ?
None of the above
Yes, you can overload a static method in Java
Yes, you can but you have to implement <Liquid Crystal>
No, there will not be any Run-time Polymorphism happening.
4
What are the four OOP concepts in Java?
Encapsulation, Inheritance, Abstraction, Polymorphism
Encapsulation, Inheritance, Abstraction, Polymoly
Encapsulation, Inheritance, Abstraction, Polygraphism
Encapsulation, Inheritance, Abstraction, Pollyanna
5
Access to an object only through its member functions, while keeping the details private is
Polymorphism
Inheritance
Mudularity
Encapsulation
6
When a class is based on another class, it inherits:
The methods and messages for the class
Only the data for the class
The data and methods for the class
7
Keyword which is used to access the method or member variables from the parent class is:
is_a
super
using
import
8
OOP promotes a way of programming that allows programmers to think in terms of:
Orientation
Procedures
Data
Objects
9
Constructors are used to
to create a sub class
To build a user interface
To free memory
To initialize a newly created object
10
When we create an object, we can access its methods and variables by using the dot operator (.)
True
False
11
Which of the following statements is true in Java?
If a constructor is not specified, a default constr. is used
A class can be an object
A class must have at least one member function
An object can be a class
12
In JAVA, static is a non-access modifier that is applicable for variables, methods and blocks
False
True