edited by
335 views

1 Answer

0 votes
0 votes

Option B PRIVATE

Methods, variables, and constructors that are declared private can only be accessed within the declared class itself.

Private access modifier is the most restrictive access level. Class and interfaces cannot be private.

Variables that are declared private can be accessed outside the class, if public getter methods are present in the class.

Using the private modifier is the main way that an object encapsulates itself and hides data from the outside world.

Related questions

1 votes
1 votes
1 answer
1
go_editor asked Mar 28, 2020
483 views
The following determiniotic finite automata recognizes:Set of all strings containing $’ab’$Set of all strings containing $’aab’$Set of all strings ending in $’a...
0 votes
0 votes
0 answers
2
go_editor asked Mar 28, 2020
715 views
Depth ion travels of the following directed graph is:$\text{A B C D E F}$$\text{A B D E F C}$$\text{A C E B D F}$None of the above
0 votes
0 votes
0 answers
3
go_editor asked Mar 28, 2020
1,173 views
The maximum number of nodes in a binary tree of depth $10$:$1024$ $2^{10}-1$ $1000$None of the above
1 votes
1 votes
1 answer
4
go_editor asked Mar 28, 2020
1,284 views
The regular expression given below describes:$r=(1+01)$*$(0+\lambda)$Set of all string not containing $’11’$Set of all string not containing $’00’$Set of all stri...