MaxSum library in java