finish arrays
use java to write class