Thursday, 2 July 2009

Java Certification Question 0022

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

No comments:

Post a Comment