SCJP題庫第069題

11. public interface Status {
12.   /* insert code here */ int MY_VALUE = 10;
13. }
Which three are valid on line 12? (Choose three.)


A. final
B. static
C. native
D. public
E. private
F. abstract
C. protected
 
Ans: A B D
 
解說:
Interface中的資料變數隱含為finalstaticpublic
final是因為介面是規格,規格是不能改的
static因介面不能具現化,必然是類別的型態
public則是介面本為公開性質

Comments

Popular posts from this blog

Android+Google Map API v3 Geocoding(地址轉經緯度度