Some utilities for Java problems