Three Indonesians died after huge waves washed them away on a beach on Java island, while nine people were killed in floods and landslides in other parts of Java and Sulawesi, officials said on Sunday.

The bodies of three high-school students had been found on Parangtritis beach south of the city of Yogyakarta, a rescue official said, while two people were still missing after they were swept away on Saturday while waiting to watch the sunrise.

The beach is a popular tourist area but known for its dangerous currents and big waves.

Separately, at least nine people were killed and five others seriously injured after floods and landslides hit East Java and Central Java, as well as South Sulawesi.

Landslides and flooding are common during Indonesia's rainy season, often made worse by deforestation that means there is little to prevent flash floods and soil erosion.