Solved

C# virtual method equivalent in java

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

Thanks
0
Comment
Question by:jdharsha
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 3

Accepted Solution

by:
ieciep earned 30 total points
ID: 18880399
0
 

Author Comment

by:jdharsha
ID: 18880435
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
ID: 18880526
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
ID: 18897841
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

Want Experts Exchange at your fingertips?

With Experts Exchange’s latest app release, you can now experience our most recent features, updates, and the same community interface while on-the-go. Download our latest app release at the Android or Apple stores today!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Suggested Courses

617 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