• Post Reply Bookmark Topic Watch Topic
  • New Topic

Super class method  RSS feed

 
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


How is the output as "SuperSuperBase" ? why second invocation calls Super method again?
[ July 24, 2008: Message edited by: amarkirt saroay ]
 
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because it's and overloading, not an overriding...
The parameters of the methods are of diferent types. So, since its an overloading, its decided on compile time, not run time :-)

See these 2 classes:
 
amarkirt saroay
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks ! got it.
 
Let's get him boys! We'll make him read this tiny ad!
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!