Early Buddhist and Hindu kingdoms of Java flourished for centuries before being replaced by Islam as the majority religion. All the religions of Java survive today, influenced by local Javanese traditions.