Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Q47 - Mock Exam - OCP7 by Mala Gupta Book

 
Ranch Hand
Posts: 59
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Q47) Select the incorrect statements (Choose three options.).

a) "Program to an interface" means using interfaces in your code.
b) An interface can't define static inner classes.
c) An interface can't declare non-final variables
d) An interface can declare un-initialized varibles.
e) An interface can define static methods.

Ans) a,b,d

Isn't letter e also an incorrect answer since we can't define static methods on interfaces? Am I missing something?

Thank you!
 
Sheriff
Posts: 9674
42
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess you are right, maybe a mistake in the book...
 
Montana has cold dark nights. Perfect for the heat from incandescent light. Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic