Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

OCA/OCP Java SE 8 Programmer Practice Tests

 
Ranch Hand
Posts: 84
2
Netbeans IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Ms. Jeanne,

On the book that was published called as "OCA/OCP Java SE 8 Programmer Practice Tests", I found compilation and error for the following items.

Page #62, Part-I, Chapter 7: Working with inheritance, Question 7.

According to Oracle, http://docs.oracle.com/javase/specs/jls/se8/html/jls-8.html#jls-8.4.3.3
A method can be declared final to prevent subclasses from overriding or hiding it. It is a compile-time error to attempt to override or hide a final method.

So, it won't compile. Answer is incorrect. It will not be B, but D. The code does not compile. Please refer to images
Thanks
partI_chap7_q7.png
[Thumbnail for partI_chap7_q7.png]
 
My cellmate was this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic