Interface
posted 14 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Do all methods in an Interface has by default Public visiblity mode..???
Subhendu Dash
Greenhorn
Posts: 18
posted 14 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
why default access visiblity can't be used with interface methods.say for ex-if i have an interface and i want only the classes in the same package to implement and thus use it.
posted 14 years ago
That's answered in the next sentence after the answer to your original question.
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
if i have an interface and i want only the classes in the same package to implement and thus use it.
That's answered in the next sentence after the answer to your original question.
luck, db
There are no new questions, but there may be new answers.
posted 14 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
An interface represents the public face of the class which implements it. That is why all members have the same access.
Subhendu Dash
Greenhorn
Posts: 18
posted 14 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
And if we want abstract methods that can be implemented only on the same package then we can use an abstratc class(by making the methods abstract and default ) rather than an interface..Isn't it???
Campbell Ritchie
Marshal
Posts: 81613
593
| This guy is skipping without a rope. At least, that's what this tiny ad said: Paul Wheaton's 16th Kickstarter: Gardening playing cards for gardeners and homesteaders https://coderanch.com/t/889615/Paul-Wheaton-Kickstarter-Gardening-playing |







