Newbie Java array question

Status
You're currently viewing only ShuggyCoUk's posts. Click here to go back to viewing the entire thread.
Not open for further replies.

ShuggyCoUk

Ars Legatus Legionis
10,388
Subscriptor++
note that, thanks to java's hilariously screwed up generics implementation you may find yourself needing to use either arrays or someone else's well implemented special cased list/map/whatever for each primitive even at the cost of awful code bloat) since the boxing/unboxing may be a problem.

Obviously that would be premature optimisation unless you actually already know it's a problem (if you do any scientific computing there's a very good chance it would be)

The above is likely well past the OP's current level but come back to it in a few months and see if you understand it then.

Be very careful about talking about deep copy operations and the implications of it until you understand the difference between types with copy semantics (in java primitives) and types with reference semantics (implying a concept of identity), also understand why immutability means you can stop worrying about it (and hence why you can treat strings as if they were either in most cases)
 
Status
You're currently viewing only ShuggyCoUk's posts. Click here to go back to viewing the entire thread.
Not open for further replies.