Java code sort code and account validation