約33,900件1ページ目

日本語のみで絞り込む

条件を指定して検索しています。すべての条件を解除する

  • 最終更新日:6か月以内
  • 2026/6/30 -If a method is designed to return null , it is suggested to mark it with the @Nullable annotation - such methods will be ignored by this inspection. Example: ...

    2026/9/24 -If the value is null, it returns an empty Optional instead. It is useful when a value might be null and needs to be represented using Optional. Unlike Optional.

    2026/8/22 -Optional.ofNullable is used when the argument may be null . It creates an empty Optional for a null argument. Simple example.

    2026/8/20 -When you see a method returning Optional , it serves as a reminder that the method might return an empty value and we need to be prepared for it. The original ...

    2026/9/23 -I've gone through several phases in the way I represent absence in Java. At first, I returned null . Then I discovered Optional , and started returning it ...

    5時間前 -An Optional is like a box that either holds a value or is empty. A method can return an Optional instead of null , to show that the result can be missing.

    2026/9/16 -A method that returns Optional must never return null . An empty result already has a representation: Optional.empty() . Returning null instead of an empty ...

    3日前 -Java 8 adds the Optional<T> class, giving developers a way to explicitly signal that a value might be absent, rather than silently returning null. 2017+. Modern ...

    2026/6/18 -こんにちは。ゆうせいです。今回は、JavaのOptionalを使ってnullを安全に扱う方法を、新人エンジニア向けに解説します。特に、DAOの戻り値とOptionalの相性が良い理由 ...

    `findFirst` — stops at the first match. Returns an `Optional`, never `null`, so no surprise `NullPointerException`. ❓ `anyMatch` — just answers "is there at ...

    InstagramOracle