Search:

Type: Posts; User: helloworld922

Search: Search took 0.08 seconds.

  1. Re: An associations with copies instead of references

    For primitives it doesn't matter. But yes, for objects you will need to call their clone/copy constructors. Additionally, you likely can get away with doing a shallow copy of strings because they're...
  2. Re: An associations with copies instead of references

    Java doesn't support copy constructors in the same way C/C++ supports them, but yes, you can write a constructor in Java which will take an object of the same type and construct all the fields back....
  3. Re: An associations with copies instead of references

    If I understand you correctly, that type of association is known as "pass by value".

    When you pass by value, the two objects physically exist in different places (depending on how deep your copy...
Results 1 to 3 of 3