[HD Pg 246, Sec. 9.2.4 - methods-in-an-interface]

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
flex567
Posts: 202
Joined: Mon Apr 02, 2018 8:40 am
Contact:

[HD Pg 246, Sec. 9.2.4 - methods-in-an-interface]

Post by flex567 »

I am not sure if I understand what this means:
Although not relevant to the OCA 8 exam, you should be aware about a serious issue with default and static methods in Java 8. If a method gets too big or if there multiple methods with a lot of common code, there is no way to refactor them into smaller methods without exposing all of them to the world because everything in an interface has to be public. Java 9 fixes this problem by allowing private methods in an interface.

admin
Site Admin
Posts: 10045
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: [HD Pg 246, Sec. 9.2.4 - methods-in-an-interface]

Post by admin »

If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 38 guests