expression
as soon as; the minute (that); no sooner than
Used after the dictionary form of a verb to indicate that one action happens immediately after another. Often found in written or formal contexts.
彼は家に着くや否や、電話をかけた。
As soon as he arrived home, he made a phone call.
ベルが鳴るや否や、生徒たちは教室を飛び出した。
The minute the bell rang, the students rushed out of the classroom.
expression
Rare and somewhat archaic use meaning 'whether or not'. Modern Japanese typically uses かどうか or 否か instead.
行くや否や、まだ決めていない。
I haven't decided yet whether or not to go.