Which of the following statements are true?
1) All of the variables in an interface are implicitly static
2) All of the variables in an interface are implicitly final
3) All of the methods in an interface are implicitly abstract
4) A method in an interface can access class level variables
Answer :
1) All of the variables in an interface are implicitly static
2) All of the variables in an interface are implicitly final
3) All of the methods in an interface are implictly abstract
All the variables in an interface are implicitly static and final. Any methods in an interface have no body, so may not access any type of variable
Java 1.2 course notes and work plan edited from several sources. This is a work in process and is constantly being refined, though may not be updated to the latest Java releases. Included is a collection of Java certification practise questions and answers.
No comments:
Post a Comment