aspose file tools*
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
Author

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
Why??
{I edited the post to add the code tag, ersin eser}
[ January 10, 2002: Message edited by: ersin eser ]
Rob Ross
Bartender

Joined: Jan 07, 2002
Posts: 2205
Sonir,
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!


Rob
SCJP 1.4
ersin eser
Ranch Hand

Joined: Feb 22, 2001
Posts: 1072
methods dynamically bind not the instant variables.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: lots of "extends" ??