java uni exercies chapter no 9