The greeting changes before lunch
Indonesian uses selamat with words for different parts of the day. Pagi refers to the morning, while siang covers the middle of the day. Language teaching materials often introduce selamat siang from around eleven in the morning, but the changeover is not fixed to an exact minute in real conversation. If somebody greets you first with a time-specific expression, returning it is a simple way to follow local usage.
A little respect without a name
The short forms Pak and Bu come from bapak and ibu, words associated with father and mother that also serve as respectful forms of address. A traveller can use them with adults without knowing their names. Saying selamat pagi before explaining your destination or asking about breakfast gives the exchange a courteous opening. In a relaxed setting, listen for pagi on its own and notice how familiar the speakers are.
A second morning language on Java
Javanese has its own morning expressions, including Sugeng enjing in a polite register. It is not another pronunciation of Indonesian. The language has different levels of speech that reflect relationships between speakers, and its use varies across Java. For a visitor, Indonesian remains the practical shared language. A Javanese greeting is a pleasant addition when a host or local acquaintance has introduced you to that language.