πŸ“Š JAVA
Q. In Java, can an interface have fields (member variables)?
  • (A) Only if they are marked as "static"
  • (B) Only if they are marked as "private"
  • (C) No, interfaces cannot have fields
  • (D) Yes, an interface can have constant (final) fields
πŸ’¬ Discuss
βœ… Correct Answer: (D) Yes, an interface can have constant (final) fields

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
99
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Praveen Singh
Publisher
πŸ“ˆ
98%
Success Rate