• Post Reply Bookmark Topic Watch Topic
  • New Topic

will method overloading apply in this example?  RSS feed

 
Sri Dharan
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1)
If I am having two methods as below in a class.Will it apply method overloading here?


2)
Object obj = new A();
What are the object oriented features applying here?
 
Devaka Cooray
Marshal
Posts: 5516
687
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1). Yes

2). Sorry, I couldn't understand what you meant.
 
Sri Dharan
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What I mean that , Is there any Inheritance, Polymorphism ..like OOP features applying here?
 
Christiaan Lombard
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Polymorphism is applying: "A reference variable can refer to any object as the same type as the declared reference, or it can refer to any subtype of the declared type."
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!