aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes what is the error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "what is the error" Watch "what is the error" New topic
Author

what is the error

nikunj thakur
Ranch Hand

Joined: Sep 23, 2007
Posts: 47
class Foo8
{
public void doFooStuff()
{
System.out.println("a");
}
public void doFooStuff1()
{
System.out.println("c");
}

}
public class Bar8 extends Foo8
{
public void doFooStuff()
{
System.out.println("b");
}
}
class Test
{
public static void main (String [] args)
{
Foo8 reallyABar = new Bar();
reallyABar.doFooStuff();
//reallyABar.doFooStuff();
//reallyABar.doFooStuff1();


// Legal because Bar is a
// subclass of Foo
// Bar reallyAFoo = new Foo(); // Illegal! Foo is not a
// subclass of Bar
}
}

i am getting exception in thread main error
what is the reason for that
Fu Dong Jia
Ranch Hand

Joined: May 23, 2007
Posts: 131
hi!

there is not a class Bar in you codes!!!


who dare win!<br />SCJP5(94%)|SCWCD5(86%)|SCBCD(100%)|SCEA in progress
dhwani mathur
Ranch Hand

Joined: May 08, 2007
Posts: 621
hi thr

i think Fudong Jia is right


there is no class Bar in your code
but the class name must be Bar8...................
isnt it?

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: what is the error