<a href="http://www.rajindery.com" target="_blank" rel="nofollow">Rajinder Yadav</a><p>Each problem that I solved became a rule which served afterwards to solve other problems. --Rene Descartes
Rob
SCJP 1.4
<a href="http://www.rajindery.com" target="_blank" rel="nofollow">Rajinder Yadav</a><p>Each problem that I solved became a rule which served afterwards to solve other problems. --Rene Descartes
Originally posted by Arsho, Ayan:
Can the interface be private and protected ?
-Arsho
<a href="http://www.rajindery.com" target="_blank" rel="nofollow">Rajinder Yadav</a><p>Each problem that I solved became a rule which served afterwards to solve other problems. --Rene Descartes
Rob
SCJP 1.4
Originally posted by Rajinder Yadav:
Rob, can a nested interface be declared final?
Top-level interfaces can only have public or default access modifiers.
Nested interfaces (contained within another class) can have any access modifier.
Rob
Only interfaces defined inside another Class can be private or protected.
Originally posted by Paul Salerno:
These two responses are conflicting, can Rob or someone please verfiy?
-Paul
Originally posted by mark stone:
final does not make sense for an interface.
final modifier is for class, method and variable
<a href="http://www.rajindery.com" target="_blank" rel="nofollow">Rajinder Yadav</a><p>Each problem that I solved became a rule which served afterwards to solve other problems. --Rene Descartes
<a href="http://www.rajindery.com" target="_blank" rel="nofollow">Rajinder Yadav</a><p>Each problem that I solved became a rule which served afterwards to solve other problems. --Rene Descartes
<a href="http://www.rajindery.com" target="_blank" rel="nofollow">Rajinder Yadav</a><p>Each problem that I solved became a rule which served afterwards to solve other problems. --Rene Descartes
no they are not conflicting.
what i had meant was that protected and private can only be used for a interface if it is inside inner class. of course this interface can have public and default-access modifier too.
Originally posted by Paul Salerno:
I still dont understand what is meant by this. If anyone has a code example, I would love to see it.
TIA
Rob
SCJP 1.4
<a href="http://www.rajindery.com" target="_blank" rel="nofollow">Rajinder Yadav</a><p>Each problem that I solved became a rule which served afterwards to solve other problems. --Rene Descartes
"Thanks to Indian media who has over the period of time swiped out intellectual taste from mass Indian population." - Chetan Parekh
Rob
SCJP 1.4
"Thanks to Indian media who has over the period of time swiped out intellectual taste from mass Indian population." - Chetan Parekh
"Thanks to Indian media who has over the period of time swiped out intellectual taste from mass Indian population." - Chetan Parekh
Rob
SCJP 1.4
"Thanks to Indian media who has over the period of time swiped out intellectual taste from mass Indian population." - Chetan Parekh
Rob
SCJP 1.4
"Thanks to Indian media who has over the period of time swiped out intellectual taste from mass Indian population." - Chetan Parekh
Originally posted by ravish kumar:
can you tell me why // interfaces are never inner
Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind.<br />- Dr. Seuss
"Thanks to Indian media who has over the period of time swiped out intellectual taste from mass Indian population." - Chetan Parekh
Originally posted by ravish kumar:
Thanks ..
now I think .. as interfaces are imlicitly static .. they are always nested... So interface are never inner
though they are nested ...
and as they are static they can not be nested in a inner class.
CMIW
TIA
[ January 24, 2002: Message edited by: ravish kumar ]
[ January 24, 2002: Message edited by: ravish kumar ]
"Thanks to Indian media who has over the period of time swiped out intellectual taste from mass Indian population." - Chetan Parekh
All that thinking. Doesn't it hurt? What do you think about this tiny ad?
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|