|
|
|
|
In Java, there are no pointers, far less pointers to functions. Instead, we pass objects, not (pointers to) functions, and we typically use interfaces. Here's what it might look like in Java:
This outputs the following: Values > 10 : 37 56 15 92 Values < 20 : 4 -5 8 2 15 which is identical output to that of the C++ program. |
|
This page was last modified on 02 October, 2007 |