- 论坛徽章:
- 0
|
Interface can have three kinds of members:
1. field
2. method
3. nesting(嵌套)class or interface
In the interface, the field is always public, static and final. But generally we can omit(省略)them. Them must have initalize values, because final field can not be null.
The methods in interface are always abstract and public, they can not be native, synchronized or strctfp. They can't be static too, because the static method is not abstract.
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/15909/showart_282466.html |
|