COMPILED: 0

METHOD ROUTER

Incoming data packets must be routed to the correct Overloaded Method.

void process(int x) { ... }
void process(String s) { ... }
void process(double d) { ... }

Watch the Argument Type (e.g. 42 is int, "Hello" is String) and click the matching method before the packet overflows!

METHOD RESOLUTION ALGORITHM

How Java decides which method to run when names are identical.

1. METHOD CALL

print(42);
Arg Type: int

2. COMPILER CHECKS

void print(String s)
void print(double d)
void print(int i)

3. EXECUTION

Waiting...

The compiler checks methods from top to bottom (conceptually) or finds the most specific match.
If an exact match is found, it is chosen. If not, it tries to promote (e.g., int -> double).