最終更新日:2025/12/03

(programming) A binary operator that returns its second argument, unless the first argument is null, in which case it returns null; used to simplify code that would otherwise need multiple explicit checks for nullity.

音声機能が動作しない場合はこちらをご確認ください
正解を見る

safe navigation operator

編集履歴(0)
元となった辞書の項目

safe navigation operator

名詞
日本語の意味
プログラミングにおいて、第一引数がnullの場合はnullを返し、そうでない場合は第二引数を返す二項演算子。明示的なnullチェックを省略してコードを簡略化するために使用され、「Null条件演算子」または「安全なナビゲーション演算子」とも呼ばれる。
このボタンはなに?

入れ子になったプロパティにアクセスする際、ヌル伝播演算子を使うと、中間の参照がヌルであればヌルを返してヌル参照エラーを防げます。

plural

Dictionary quizzes to help you remember vocabulary

編集履歴(0)

ログイン / 新規登録

 

アプリをダウンロード!
DiQt

DiQt(ディクト)

無料

★★★★★★★★★★