why does +java not support optional chaining operator -javascript code example
Example 1: optional-chaining operator
if (user?.team?.subscription?.invoices) {
//
}
Example 2: optional chaining in javascript
let myMap = new Map();
myMap.set("foo", {name: "baz", desc: "inga"});
let nameBar = myMap.get("bar")?.name;