[Solved] java new object.method() why not be a error? [closed]


the operator ‘.’ is prior than new

No it isn’t. The operator . is not prior to new: they are both Primary, so they have equal precedence, so they evaluate left to right.

why this can be executed right?

The real question is why can it be compiled, and I’ve answered that.

It hasn’t tell me it’s a error.

It isn’t an error.

0

solved java new object.method() why not be a error? [closed]