🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

beginning java: constructor problem with subclass

#8150
From: hi
Date: Sun, 22 Apr 2001 06:33
32 lines
1604 bytes
Hi,

I am using some simple classes to test the different access specifiers, but
I am getting the following error when I try to compile a subclass:

TestPrivate2.java:1: cannot resolve symbol
symbol  : constructor TestPrivate1a  ()
location: class TestPrivate1a
public class TestPrivate2 extends TestPrivate1a
            ^
1 error


Here are my classes:

public class TestPrivate1a
{
 protected int iAmPro;
 public TestPrivate1a(int x)
 {
  iAmPro = x;
 }
}

public class TestPrivate2 extends TestPrivate1a
{
 public static void main(String[] args)
 {
  TestPrivate1a   aTestPrivate1a = new TestPrivate1a(10);
  System.out.println(aTestPrivate1a.iAmPro);
 }
}
Technical Details
Message-ID: <3ae27b56$1_1@dnews>
Path: arc1-ca.pugleaf.net!newsfeed.google.com!sn-xit-03!supernews.com!feeds.vnews.net!nntp.cifnet.net!feed2.onemain.com!feed1.onemain.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,69cce75b48e20b78,start
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-04-21 23:46:04 PST
From: "hi" <noneofyourbusiness@none.com>
Newsgroups: borland.public.jbuilder.java.language
Subject: beginning java: constructor problem with subclass
Date: Sun, 22 Apr 2001 00:33:06 -0600
Lines: 34
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
NNTP-Posting-Host: 208.187.113.66
Message-ID: <3ae27b56$1_1@dnews>
X-Trace: dnews 987921238 208.187.113.66 (21 Apr 2001 23:33:58 -0700)
Path: arc1-ca.pugleaf.net!newsfeed.google.com!sn-xit-03!supernews.com!feeds.vnews.net!nntp.cifnet.net!feed2.onemain.com!feed1.onemain.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews