Implement a convolution program in Java.