Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!weretis.net!feeder1.news.weretis.net!newsfeed.CARNet.hr!garrison.bnet.hr!gregory.BNet.hr!not-for-mail From: Josip Almasi Newsgroups: comp.lang.java.programmer Subject: Re: Java blunders Date: Tue, 29 Jul 2014 00:41:28 +0200 Organization: B.net Hrvatska d.o.o. Lines: 23 Message-ID: References: NNTP-Posting-Host: cpe-188-252-131-105.zg5.cable.xnet.hr Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: gregory.bnet.hr 1406587288 4979 188.252.131.105 (28 Jul 2014 22:41:28 GMT) X-Complaints-To: abuse@globalnet.hr NNTP-Posting-Date: Mon, 28 Jul 2014 22:41:28 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 In-Reply-To: Xref: csiph.com comp.lang.java.programmer:29418 On 07/29/2014 12:12 AM, Stefan Ram wrote: > Josip Almasi writes: >> 1) Multiple inheritance > ... >> That's feature critically lacking in java. > > interface Hello { default void hello() > { java.lang.System.out.print( "hello, " ); }} > > interface World { default void world() > { java.lang.System.out.println( "world" ); }} > > public class Main implements Hello, World > { public static void main( final java.lang.String args[] ) > { final Main main = new Main(); main.hello(); main.world(); }} Ah that's interesting improvement, thanks! Sure it will save us a lot of copy&paste... finally. So I can access 'this' and members in default implementations, right? I mean examples I see are all static implementations. Regards...