Simple example of Java API