Java: OOP (Part 2)

0.0(0)
studied byStudied by 0 people
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/29

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

30 Terms

1
New cards

Recursion

______ is the technique of making a function call itself

2
New cards

Recursion

This technique provides a way to break complicated problems down into simple problems which are easier to solve

3
New cards

infinite recursion

Just as loops can run into the problem of infinite looping, recursive functions can run into the problem of _______

4
New cards

method overloading

With ______, multiple methods can have the same name with different parameters

5
New cards

number, parameters

Multiple methods can have the same name as long as the ____ and/or type of ______ are different.

6
New cards

method overriding, child, parent

With ______, a child class can give its own implementation to a method which is already provided by the parent class

7
New cards

parent class

_____ is called overridden method

8
New cards

child class

the method in _____ is called overriding method

9
New cards

inherited

The class can give its own specific implementation to a ____ method without even modifying the parent class code

10
New cards

Type modifiers

_____ are keywords used in the identifier definitions to change their meanings

11
New cards

precedes

To use the modifiers, it ____ the statements that include its keyword in the definition of a class, method, or variable.

12
New cards

default

Identifiers defined without any access modifier keyword will have a _____ modifier access.

13
New cards

public

Identifiers can be accessed by all the other classes in the project.

14
New cards

private

If an identifier is declared as ____, then it can be accessed within the class. The identifier would not be available outside the class. The outside members cannot access the ____ members.

15
New cards

protected

If an identifier is declared as ____, it can be accessed within the same package classes and sub-class of any other packages.

16
New cards

default

Scope only inside the same package

17
New cards

public

Scope is visible to world

18
New cards

private

Scope only within the classes only

19
New cards

protected

Scope of the package and all subclasses

20
New cards

subclasses

Methods declared public in a superclass also must be public in all _____

21
New cards

protected, public, private

Methods declared protected in a superclass must either be _____ or ____ in subclasses; they cannot be _____

22
New cards

private

Methods declared ____ are not inherited at all, so there is no rule for them

23
New cards

final

The ___ keyword is used to make any class, method, or variable final

24
New cards

final

A ____ variable that is initialized can no longer change its value again

25
New cards

abstract

An ____ class or method cannot be final because an abstract class is intended to be extended in other classes and made for the purpose of being overriding the method body

26
New cards

one abstract method

To define an abstract class, at least _______ should be defined in a class.

27
New cards

abstract

If we have to declare abstract methods in a class, a class must be an _____ class

28
New cards

volatile

The ____ keyword is applied only to private or object type instance field or variable

29
New cards

volatile

A _____ variable synchronizes all the available cached copies of variables in memory

30
New cards

transient

The ____ keyword is an instance variable declaration instructs the JVM to skip the variable or field while serializing the object containing that variable