the virtual Methods concept is very difficult concept.
In c++ when we want to implement polymorphism then we use virtual function. But in the case of java i read that all methods in java are virtual by default except final methods that can not be overridden. I am confuse about polymorphism and virtual functions. Why methods in java are virtual by default and why not in c++. This is my basic question. Please help me.
First of all tell me what is virtual functions.
and how can we prove that methods in java are virtual by default.
i want proof about this.
moaz.amin.37
-12
Junior Poster
Recommended Answers
Jump to Postwe're not here to do your homework for you, and this is clearly just your homework assignment that you're dumping here.
Show what you've done, give us your ideas, and maybe someone will tell you if you're right.
Jump to PostThe Java Language Specification does not have "virtual methods" or "virtual functions" These are jargon from another language. If you have a question about C++ this is the wrong forum.
All 5 Replies
jwenting
1,855
duckman
Team Colleague
JamesCherrill
4,667
Most Valuable Poster
Team Colleague
Featured Poster
moaz.amin.37
-12
Junior Poster
JamesCherrill
4,667
Most Valuable Poster
Team Colleague
Featured Poster
jwenting
1,855
duckman
Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.