Fixed misstake in java code for section 4