Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

will method overloading apply in this example?

 
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
ExamLab Creator
Marshal
Pie
Posts: 4682
331
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."
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic