Java example