Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #34236

Re: When to use dynamic binding over dynamic dispatch?

From Sebastian <news@seyweiler.dyndns.org>
Newsgroups comp.lang.java.programmer
Subject Re: When to use dynamic binding over dynamic dispatch?
Date 2016-05-03 20:47 +0200
Organization albasani.net
Message-ID <ngaror$ik8$1@news.albasani.net> (permalink)
References <ebf7e9a1-18b1-4d36-91ef-7dc93d0bf25a@googlegroups.com>

Show all headers | View raw


Am 03.05.2016 03:08, schrieb cdalten@gmail.com:
>  From what I understand, dynamic binding implies dynamic dispatch. So the question is, when do you use one over the other?
>
Sounds a bit like an interview question, or homework.

You do not usually "use" one or the other at all. These things get 
decided for you by the JVM (the Java runtime) and the Java compiler.
You should look at how these two interact, and when it is decided what 
variable names and method calls mean for

private, final and static methods and variables
abstract resp. overridden methods
overloaded methods
etc.

The compile time type of a reference variable and the runtime type of an 
object are not necessarily the same, and different decisions are based 
on each.

Read a good book. I suppose the topic is really too large and the 
question too imprecise for a newsgroup posting.

-- Sebastian

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

When to use dynamic binding over dynamic dispatch? cdalten@gmail.com - 2016-05-02 18:08 -0700
  Re: When to use dynamic binding over dynamic dispatch? Sebastian <news@seyweiler.dyndns.org> - 2016-05-03 20:47 +0200
    Re: When to use dynamic binding over dynamic dispatch? Lew <lewbloch@gmail.com> - 2016-05-03 12:14 -0700
  Re: When to use dynamic binding over dynamic dispatch? Arne Vajhøj <arne@vajhoej.dk> - 2016-05-03 21:23 -0400
    Re: When to use dynamic binding over dynamic dispatch? Martin Gregorie <martin@address-in-sig.invalid> - 2016-05-04 10:48 +0000
    Re: When to use dynamic binding over dynamic dispatch? Robert Klemme <shortcutter@googlemail.com> - 2016-05-08 12:24 +0200
      Re: When to use dynamic binding over dynamic dispatch? Arne Vajhøj <arne@vajhoej.dk> - 2016-05-08 08:23 -0400
        Re: When to use dynamic binding over dynamic dispatch? Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-05-08 08:57 -0400
          Re: When to use dynamic binding over dynamic dispatch? Arne Vajhøj <arne@vajhoej.dk> - 2016-05-08 10:37 -0400
            Re: When to use dynamic binding over dynamic dispatch? Robert Klemme <shortcutter@googlemail.com> - 2016-05-08 22:30 +0200
              Re: When to use dynamic binding over dynamic dispatch? Arne Vajhøj <arne@vajhoej.dk> - 2016-05-08 23:08 -0400
                Re: When to use dynamic binding over dynamic dispatch? Robert Klemme <shortcutter@googlemail.com> - 2016-05-09 08:16 +0200
            Re: When to use dynamic binding over dynamic dispatch? Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-05-08 16:44 -0400
              Re: When to use dynamic binding over dynamic dispatch? Arne Vajhøj <arne@vajhoej.dk> - 2016-05-08 23:16 -0400
                Re: When to use dynamic binding over dynamic dispatch? Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-05-09 00:39 -0400

csiph-web