File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

what is the error

nikunj thakur
Ranch Hand

Joined: Sep 23, 2007
Posts: 47
class Foo8
public void doFooStuff()
public void doFooStuff1()

public class Bar8 extends Foo8
public void doFooStuff()
class Test
public static void main (String [] args)
Foo8 reallyABar = new Bar();

// 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

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?

I agree. Here's the link:
subject: what is the error
It's not a secret anymore!