Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Beginning Java
Search Coderanch
Advance search
Google search
Register / Login
Forums
Register
Login
Java
»
Beginning Java
Pure virtual function
Mahesh Bamane
,
Ranch Hand
Mar 27, 2008 08:00:00
(0 cow)
(0 skulls)
+Pie
Number of slices to send:
Send
Can anyone please explain me what is a pure virtual function/method(with example)?
Peter Chase
,
Ranch Hand
Mar 27, 2008 08:03:00
(0 cow)
(0 skulls)
+Pie
Number of slices to send:
Send
The terms "virtual function" and "pure virtual" are from C++, not
Java
.
Rob Spoor
,
Sheriff
staff
Mar 27, 2008 09:15:00
(0 cow)
(0 skulls)
+Pie
Number of slices to send:
Send
The best Java alternative is an abstract method; this requires the entire class to be abstract:
abstract class MyClass { // "regular" virtual method, since all non-static methods are "virtual" in Java public void doSomething() { } // pure virtual method public abstract void doSomethingElse(); }
Mahesh Bamane
,
Ranch Hand
Mar 28, 2008 00:49:00
(0 cow)
(0 skulls)
+Pie
Number of slices to send:
Send
Thanks Rob
Post by:
autobot
them good ole boys were drinking whiskey and rye singin' this'll be the day that I die. Drink tiny ad.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
reply
This thread has been viewed 29740 times.
Similar Threads
What are virtual functions ?
Multiple targets in websphere?.
Virtual Keyword
WSAD Crashes!!!!
Virtual function
More...
All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 22:59:31
.