Black hole number Java code implementation