Originally posted by Tony kunds:
I am not understanding the concept of
1)how the abstact inner class is extended ? (or how it will work)
2) how the class defined in an interface will work?
any examples are appriciated
-thanks in advance
Originally posted by Tony kunds:
interface members are by default abstract so defining abstract will cause compile time error.
Originally posted by Tony kunds:
1)interface variables are public static and final by default
2)interface methods are public static abstract by default
3)classes inside interface are public and static by default.
Originally posted by Corey McGlone:
I hope that helps,
Corey
Originally posted by jackie Wang:
[QBit make sense to make for abstract class. But what's the meaning of abstract int?[/QB]
SCJP2. Please Indent your code using UBB Code
originally posted by CoreyMcGlone
Classes inside an interface are whatever you want them to be. They need not be public or static.
Look back at the example I gave. I declared two classes within the interface and neither of them was static and neither of them was public
originally posted by Jose Botella
Classes nested within interfaces are always public, even this one
code:
class MY {
private interface Inter
{ class Nested {}
}
}
SCJP2. Please Indent your code using UBB Code
best regards,<br />Steven<br />SCJP, SCEA
SCJP2. Please Indent your code using UBB Code
Interfaces may contain member type declarations (�8.5). A member type declaration in an interface is implicitly static and public.