Added FP for Java Part3.
Fixed a type.