I
I
iscateli2021-11-20 11:54:52
Java
iscateli, 2021-11-20 11:54:52

Are all Java methods using late binding?

Please tell me, right now I'm reading Bruce Eckel - Java Philosophy , it is written (241 pages) that in Java

Now that you know that all method binding in Java is polymorphic, through late binding, you can write code for a base class with
the confidence that it will also work correctly for all derived classes.

In the original :
Once you know that all method binding in Java happens polymorphically via late binding, you can write your code to talk to the base class and know that all the derived-class cases will work correctly using the same code.

How to translate the first part of a sentence correctly? Because the translated part of the sentence
binding of all methods in Java is done polymorphically, through late binding

is not true: final methods, static methods, methods called via super use the early binding mechanism.
I would most likely mistranslate like this:
Once you know that all method binding in Java is polymorphic with late binding

But you can translate it like this:
All polymorphic methods are bound using late binding.
which greatly changes the meaning of the phrase, now it does not apply to all Java methods, but only to methods involved in polymorphism.
Please tell me what is actually written in the original.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Gornostaev, 2021-11-20
@sergey-gornostaev

It should be understood that "Philosophy of Java" is an intermediate level textbook, so Eckel either simplified for clarity or wrote it in the context of a discussion that excludes static methods and superclass method calls.

D
DollyPapper, 2021-11-20
@DollyPapper

Well, everything is logical. For that code whose type we can know in advance - early (static) binding. For polymorphs, late binding.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question