The best practice for Java API.