Correct Java syntax issues.

Various Java syntax changes.