Questions tagged [dynamic-binding]

Dynamic binding (aka dynamic dispatch) is the process of mapping a message to a specific piece of code (method) at runtime.

257 questions
0
votes
0 answers

How to achive dynamic binding with ArrayList in Java?

It looks like ArrayList in Java do not support dynamic binding. When I tried to do following code it gave compile time error. Code: class Value { } class IntegerValue extends Value { int value; } class…
Dhwanit
  • 610
  • 1
  • 9
  • 17
0
votes
1 answer

Output of static base type and dynamic derived type

The answer to the below output of main is "derived class display with i=10", but I do not understand why? Surely the function was invoked on the base type? What is the thought-process in determining the answer here? class base { public: …
user997112
  • 29,025
  • 43
  • 182
  • 361
0
votes
1 answer

What would happen internally when "Fish f = new BlueFish();"?

Suppose we have: 1 public class DynamicDispatch { 2 public static void main(String[] args) { 3 Fish f = new BlueFish(); 4 f.speak(); 5 } 6 } 7 8 abstract class Fish { 9 abstract String speak(); 10 } …
JackWM
  • 10,085
  • 22
  • 65
  • 92
0
votes
1 answer

800a0035 Error with Net-COM Interop

I have a C# application that needs to utilize a COM class that is written in VB6. The application has to use dynamic binding because it has to be able to use different versions of the code based on what version (i.e., what DLL) the user selected. …
Sildoreth
  • 1,883
  • 1
  • 25
  • 38
0
votes
1 answer

What is the difference between c++ dynamic binding and java dynamic binding?

What is the difference between c++ dynamic binding and java dynamic binding?
Carlos
  • 1
  • 1
  • 1
0
votes
1 answer

Need to get the pie chart with % values

My ASPX part
//I want this part…
Rakesh
  • 87
  • 1
  • 3
  • 9
0
votes
2 answers

Does the following C# program use static or dynamic binding?

I have the following classes: class Polygon { protected string name; protected float width, height; public Polygon(string theName, float theWidth, float theHeight) { name = theName; width = theWidth; height =…
SeeknInspYre
  • 360
  • 1
  • 3
  • 16
0
votes
3 answers

Call by Name with dynamic scoping

I am stuck at the following problem on static/dynamic scoping: The following program fragment is written in a programming language that allows global variables and does not allow nested declarations of functions. global int i = 100, j = 5; void…
Ravindra S
  • 6,302
  • 12
  • 70
  • 108
0
votes
2 answers

Dynamic binding a few

Hi Experts can I do dynamic binding like this. objshapes is the parent class called Shape and Rectangle is the child class. I have a few child classes so depending which shape the user selects, I need to bind the correct shape to the objShapes. So…
rasul1719435
  • 115
  • 4
  • 10
0
votes
6 answers

Run-time Polymorphism in Java without "abstract"?

I was going over the official Oracle tutorial where it introduces the idea of polymorphism with the example of a class hierarchy of 3 classes; Bicycle being the superclass, and MountainBike and RoadBike being 2 subclasses. It shows how the 2…
softwarelover
  • 1,009
  • 1
  • 10
  • 22
0
votes
3 answers

Effective Java item 19- only using interfaces to define types

I have an abstract class which implements two interfaces. Am I right in thinking Because I use two interfaces, I cannot use either interface to implement dynamic binding? Reason being if I were to use one of the interfaces, I would obviously not be…
user997112
  • 29,025
  • 43
  • 182
  • 361
0
votes
1 answer

creating a dynamic binding in JavaScript

I'm implementing a feature which will allow me to dynamically add columns into a JavaScript table: for(var i = 0; i < info.length; i++){ var temp = []; temp.push(parseInt(info[i].site_id)); temp.push(info[i].site); …
cybertextron
  • 10,547
  • 28
  • 104
  • 208
0
votes
1 answer

WPF combobox dynamic binding

I've a combo box with in data grid edititemtemplate and i write some code in combo box loaded event like: Code: private void cmbGFld_Loaded(object sender, RoutedEventArgs e) { ComboBox cmb = (ComboBox)sender; …
nag
  • 920
  • 6
  • 27
  • 51
0
votes
1 answer

JSF: UI component dynamic rebinding in a single page wihout reload. Possible?

Being inspired with the article considering the dynamic table rendering (thank you BalusC), I've finally got the exact result I wanted before here a bit earlier. That gave quite perfect results since I could control the behavior of a every single…
Lyubomyr Shaydariv
  • 20,327
  • 12
  • 64
  • 105
0
votes
3 answers

The relation between the declared type and created type

I have an question about the following code (Is this call dynamic binding?). I feel confused about 3 point. First, what is the mean of the variable pq? Does pd still be the data type of P or be the Q? Second, when I invoke the pq.m(pp) method, why…
Cooky Kao
  • 43
  • 1
  • 2
  • 6