When you use the dot operator, the thing on the left can be only a Map or a bean, and the thing on the right must follow Java naming rules for identifiers. But with the [ ], the thing on the left can also be a List or an array (of any type). That also means the thing on the right can be a number, or anything that resolves to a number, or an identifier that doesn’t fit the Java naming rules. For example, you might have a Map key that’s a String with dots in the name (“com.foo.trouble”).