Solved

C# virtual method equivalent in java

Posted on 2007-04-09
4
574 Views
Last Modified: 2012-06-27
Hi,
    What is the VIrtual method equivalent in java?

Thanks
0
Comment
Question by:jdharsha
4 Comments
 
LVL 3

Accepted Solution

by:
ieciep earned 30 total points
Comment Utility
0
 

Author Comment

by:jdharsha
Comment Utility
Thanks!! but can you send me any link that says Virtual method in c# is equivalent to abstract in java.b'cos I came across following:

What is the difference between virtual and abstract?

These two keywords are sometimes confused because both can be over-ridden. However, unlike Virtual members, Abstract members have no implementation.
0
 
LVL 25

Expert Comment

by:clockwatcher
Comment Utility
All methods in java are virtual.

http://www.smotricz.com/kabutz/Issue021.html
0
 
LVL 9

Assisted Solution

by:ripahoratiu
ripahoratiu earned 20 total points
Comment Utility
Well in very siple words:
Abstract methods are "pure virtual", they don't have a body and MUST be implemented (overrided) by the childs in order for them to be instantiable, orelse they are abstract classes too.
Virtual methods CAN be overrided, they provide an implementation but can be modified by the derived classes (through override).
Therefore an abstract method IS a virtual method and obviously the reverse is not true.

And yes, in Java all the methods are virtual (can be overriden in derived classes), so you won't find out a word for it.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now