• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

lots of "extends" ??

 
Ranch Hand
Posts: 435
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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 ]
 
Bartender
Posts: 2205
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
Ranch Hand
Posts: 1072
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
methods dynamically bind not the instant variables.
reply
    Bookmark Topic Watch Topic
  • New Topic