🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #7710

Inhertied

#7710
From: Maverick Koe
Date: Tue, 29 May 2001 15:39
26 lines
1662 bytes
Hi,

    There is a keyword "Inherited" in the object pascal.  Does Java have the
same functionality? I put the example to illustrate the problem.  Thanks in
advance!

Class A{
    public void printabc() {System.out.println("Class A");}
}

Class B extends A{
    inherited;
    public void printabc() {System.out.println("Class B");}
}

int main(string argv[]){
    A b = new b();
    b.printabc();
}

I hope the result will pirnt as follows.
==================================
Class A
Class B

Maverick Koe
Technical Details
Message-ID: <1pPQ6.74148$425.20047217@news3.rdc1.on.home.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!newsfeed2.skycache.com!newsfeed.skycache.com!Cidera!cpk-news-hub1.bbnplanet.com!news.gtei.net!newshub2.home.com!news.home.com!news3.rdc1.on.home.com.POSTED!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,50b395db69b064e1,start
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-05-29 08:41:35 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!newsfeed2.skycache.com!newsfeed.skycache.com!Cidera!cpk-news-hub1.bbnplanet.com!news.gtei.net!newshub2.home.com!news.home.com!news3.rdc1.on.home.com.POSTED!not-for-mail
Reply-To: "Maverick Koe" <kckoe@home.com>
From: "Maverick Koe" <kckoe@home.com>
Newsgroups: borland.public.jbuilder.java.language
Subject: Inhertied
Lines: 28
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Message-ID: <1pPQ6.74148$425.20047217@news3.rdc1.on.home.com>
Date: Tue, 29 May 2001 15:39:41 GMT
NNTP-Posting-Host: 24.42.164.10
X-Complaints-To: abuse@home.net
X-Trace: news3.rdc1.on.home.com 991150781 24.42.164.10 (Tue, 29 May 2001 08:39:41 PDT)
NNTP-Posting-Date: Tue, 29 May 2001 08:39:41 PDT
Organization: Excite@Home - The Leader in Broadband http://home.com/faster