Pergunta de entrevista da empresa Ericsson

what are the access modifiers,

Respostas da entrevista

Sigiloso

4 de fev. de 2015

public, private , protected , default

Sigiloso

25 de nov. de 2016

default : When we don't add any modifier before the variables, methods and class, It is default by default. It can be accessed only within the package. public : public modifier, we can access it from anywhere. protected : this modifier is accessible within the class and outside the class only by inheritance. private : this modifier is accessible only within the class.