Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

About Interfaces

 
kalpana appala
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

 
kalpana appala
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ranchers
Sorry for the incompleted question in the previous forum. Below is the completed question

The answer for the above code is d.
But i thought the answers are b,d . Can anyone explain why b is not a correct answer. I read that constant can be a member of an interface.

Thanks
kalpana
 
Abdulla Mamuwala
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
A constant can be a member of an interface
A variable declared within an interface is implicity public static and final which implies that it is a constant, therefore the answer.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic