ADD: Implementation of the longest common substring algorithm in Java.