java - Why interface variable or field more precise are not default? -


i mean why cannot have default access specifier , please don't tell me java developer made know this link give me information ..my real question why cannot default access specifier? not having private make sense variable useless ..but why not default access specifier?

the important thing how public interface is. doesn't make sense have interface methods less public interface itself. making interface methods public means visible whenever interface is.

access modifiers there protect implementation details, if wanted hide method wouldn't expose in interface.


Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -