Re: Implementation Inheritance
tonyd62246@aol.com wrote:
How can this implementaion inheritance be linked to run.
[snip code]
"public static void main(String argv[])" method not found in
nightingale}nightingale failed.
Tony
Try this, also using the standard Java formating and name convention:
public class Bird
{
protected static int referenceCount = 0;
Bird()
{
referenceCount++;
}
protected void fly()
{
/* Flap wings, etc. */
}
protected int getRefCount()
{
return referenceCount;
}
static public void main(String[] args)
{
// TODO code application logic here
}
}
class Nightingale extends Bird
{
Nightingale()
{
referenceCount++;
}
static public void main( String[] args)
{
System.out.print("Before: " + referenceCount);
Nightingale nightingale = new Nightingale();
System.out.println(" After: " + referenceCount);
nightingale.fly();
}
}
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________________________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)