🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Extending custom classes

#15
From: Vladimir Olenin
Date: Sat, 17 Oct 1998 00:00
71 lines
3333 bytes
This is a multi-part message in MIME format.
--------------0CFCA2CFE777BB8BCF2C7DA3
Content-Type: text/plain; charset=koi8-r
Content-Transfer-Encoding: 7bit

So, the question must not be very confusing. i have a class A that
extends Thread. Then, i have class B that extends A. The first problem
was that i didn't compile printing out the error that "class A doesn't
have A() constructor" To tell the truth it really hadn't have such. When
i added an empty one, this error disappeared. So, it is the question of
curiosity: why does class A need that constructor without parameters to
be extended?
Another one is a real question. The deal is that constructor of class B
has smth like this in its body:

public class B extends A{

  public B(Smth a1, Smth a2, Smth a3, Smth, a4){
    try{
    
    ....
    }
    catch{
    ....
    }
  }

But i need to call the constructor of class A here. If i wouldn't had
had try catch blok, then evrth would have been simple. I just should
call super(a1, a3) 4 instance and that's all. But since the first string
is "try{" then i still have another possibility of calling it via
super.A(a1, a3) But as it appeared it's not correct, since the compiler
translate this expression like calling a function A, not the
constructor.
So, the question is can i do this (call A constructor from try catch
blok) or not? I don't mean the way when u replace try catch blok outside
B constructor ( try{ new B(...)}catch{} )


If u know that it's possible than explain it to me. If u know that it's
not possible, write me back anyway 4 me to know. Thanks in advance. I do
appreciate the time u spent reading this long message, and the time u'll
possibly spend answering me.

                                          Vladimir

-- 
>-------<===========>-------<
Join in Java community now!
http://www.geocities.com/SiliconValley/Heights/9815
(NB: the page is under construction now)
>-------<===========>-------<
--------------0CFCA2CFE777BB8BCF2C7DA3
Content-Type: text/x-vcard; charset=koi8-r;
 name="keenonjava.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Vladimir Olenin
Content-Disposition: attachment;
 filename="keenonjava.vcf"

begin:vcard
n:Vladimir;Olenin
x-mozilla-html:FALSE
adr:version:2.1
version:2.1
email;internet:keenonjava@collegemail.com
note:Java programmer. Open for project development offers. See my home page at: http://www.geocities.com/SiliconValley/Heights/9815/
end:vcard


--------------0CFCA2CFE777BB8BCF2C7DA3--
Technical Details
Message-ID: <3627D405.39785DA8@collegemail.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,d081ad3c3fbcd4c7,start
X-Google-Attributes: gid111d45,public
X-Google-Thread: f74b3,d081ad3c3fbcd4c7,start
X-Google-Attributes: gidf74b3,public
X-Google-Thread: ff01d,d081ad3c3fbcd4c7,start
X-Google-Attributes: gidff01d,public
From: Vladimir Olenin <keenonjava@collegemail.com>
Subject: Extending custom classes
Date: 1998/10/17
Message-ID: <3627D405.39785DA8@collegemail.com>
X-Deja-AN: 401947977
X-Accept-Language: en,ru
Content-Type: multipart/mixed; boundary="------------0CFCA2CFE777BB8BCF2C7DA3"
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language,borland.public.jbuilder.java.swing,borland.public.jbuilder.applet-issues