We all know about the Dynamic dispatch in java. But if there is dynamic dispatch , then is there a Static dispatch also? (Easy One...)

  1. True

  2. False


Correct Option: A

AI Explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) True - This option is correct. In Java, static dispatch refers to the binding of a method call to its declaration at compile-time, based on the static type of the reference variable. This means that the method to be called is determined at compile-time and does not change at runtime.

Option B) False - This option is incorrect. Static dispatch does exist in Java.

The correct answer is A) True. This option is correct because static dispatch is a concept in Java where the method to be called is determined at compile-time based on the static type of the reference variable.

Find more quizzes: