+ 1
Without access specifier,will Method be treated as default or private??
7 Answers
+ 4
default
+ 1
it will be consider as default !!
0
Thats what i mean to ask.
default and private are not same.
so in java without access specifier which one will be considered!
0
But in case of C++ it is private when field is specied
0
somebody please give an upvote to my question..**
i need to unlock this achievement \__/
0
It won't be private
0
If we don't provide access specifier then it is considered as a default.
That means there are 4 access specifier in Java.
private
default
protected
public