Update Program1.6.2-Java

Accepted solution