Notices
Results 1 to 2 of 2

Thread: Dynamic Binding

  1. #1 Dynamic Binding 
    New Member
    Join Date
    Jul 2005
    Posts
    3
    Can someone compare the dynamic binding of C++ and Java?


    Reply With Quote  
     

  2.  
     

  3. #2  
    Forum Freshman sara8's Avatar
    Join Date
    Jul 2005
    Location
    Cairo
    Posts
    14
    hi soccer022483,

    Dynamic Binding is a programming concept it's alike in all programming languages meaning that it arranges for the decision to be deferred until the program is running .For example in C++ if you know virtual function and polymorphism ..if there's a base class with a virtual function draw() and there are derived classes that inherit this method draw().In the void main if there are 2 ptrs one pointing on the base class and the other pointing on the derived class and then we try to access the draw() method in each class the compiler won't diffrentiate at compile time which method to call the one in the base class or the derived class it saves this decision until runtime when it knows what class is pointed to by the ptr... you can implement the same concept with Java but I think with diffrent syntax .The concept is the same whatever programming language you use soccer .I hope this helps.

    Sara,


    The things that hurt instruct
    Reply With Quote  
     

Bookmarks
Bookmarks
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •