Java api examples