In C++ when I have algorithm which could accept different behaviour in runtime I rather use function pointer. 

For example, a program for drawing charts has one algorithm to draw line which can accept any function to specialize shape of this line.

In Java there are no function pointers and I am obliged to use either the strategy pattern or reflection (or another pattern).

How to to enable special behavior to be selected at runtime in my programme?
Strategy pattern either function pointer?