Solved

C# virtual method equivalent in java

Posted on 2007-04-09
4
591 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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
parsing question on dynamic concatenation 3 40
Send parameters via datatable ajax call 4 44
.NET Redemption/Outlook Examples 3 33
Health check of winows and webservces 5 51
Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

738 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