Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Why does Java forces Interface methods to be public only?

843789Jun 8 2010 — edited Jun 11 2010
I cannot find out any good reason for java interface must have public methods.

It seems like there is no must reason for this.

Is there a reason for this that I am not seeing? Why does Java do this? And do you think it would make sense to allow interface methods to have something other than public visibility?

Regards,
Jaykishan
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 9 2010
Added on Jun 8 2010
19 comments
953 views