cross word written in java using matrix