Examples to show usage from Java