The concept of swarga was later introduced after Hinduism and Buddhism came. It means the place for the spirits of people who have done good deeds when living. The word swarga and the word kahyangan were both then used to depict the concept o heaven with slightly different meaning.
After the introduction of Islamism and Christianity, the meaning of both words changed further, of which the word kahyangan is used to mean the realm where gods and goddesses reside, and the word swarga or sorga means the final resting place for the spirits of people who were living by the rules and teachings of their religion.
Kahyangan is referenced in many Javanese folktales and legends. Some of the stories which make references to kahyangan are: