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 lots of 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 "lots of "extends" ??" Watch "lots of "extends" ??" New topic

lots of "extends" ??

sonir shah
Ranch Hand

Joined: Nov 01, 2001
Posts: 435

Options :
1) The program will fail to compile
2) Class cast exception at runtime
3)it will print 30,20
4)it will print 30,30
5)it will print 20,20
The output is 3)30,20
{I edited the post to add the code tag, ersin eser}
[ January 10, 2002: Message edited by: ersin eser ]
Rob Ross

Joined: Jan 07, 2002
Posts: 2205
you need to start using the CODE tags before and after your code. Type [ CODE ] without any spaces between the bracket and the word CODE at the begining of your code, then [ /CODE ] at the end of your code, without the spaces. This will make it much much easier to read your code and help you!

SCJP 1.4
ersin eser
Ranch Hand

Joined: Feb 22, 2001
Posts: 1072
methods dynamically bind not the instant variables.
subject: lots of "extends" ??
It's not a secret anymore!