4 ms·
Yes, if it did that we would be able to modify it (and have those modifications reflected outside function scope). It doesn't, so we aren't. Primitives add comp
by awj 16y ago
Yes, if it did that we would be able to modify it (and have those modifications reflected outside function scope). It doesn't, so we aren't. Primitives add complexity to many aspects of Java, calling semantics being one of them.
I'd rather they'd went the route of forcing you to always use wrapped primitive types, but it's hard to fault the Java designers on that decision, especially when you consider the context of the time when it was made.