+ 1

Without access specifier,will Method be treated as default or private??

24th Jun 2016, 7:19 AM
Saud Ahmad
Saud Ahmad - avatar
7 Answers
+ 4
default
24th Jun 2016, 8:34 AM
Soroush Keyana
Soroush Keyana - avatar
+ 1
it will be consider as default !!
11th Sep 2016, 8:29 PM
Bhushan Gaikwad
Bhushan Gaikwad - avatar
0
Thats what i mean to ask. default and private are not same. so in java without access specifier which one will be considered!
24th Jun 2016, 7:58 AM
Saud Ahmad
Saud Ahmad - avatar
0
But in case of C++ it is private when field is specied
24th Jun 2016, 8:25 AM
Saud Ahmad
Saud Ahmad - avatar
0
somebody please give an upvote to my question..** i need to unlock this achievement \__/
24th Jun 2016, 9:08 AM
Saud Ahmad
Saud Ahmad - avatar
0
It won't be private
26th Jun 2016, 3:01 AM
Aditi
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
31st Jul 2016, 7:23 PM
sud
sud - avatar