|
|
|
Копирование объектов !
|
|||
|---|---|---|---|
|
#18+
Стыдно конечно задавать такой вопрос, но все же... Есть ли в java механизмы копирования объектов? типа этого - object1.assing(object2); ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 21.06.2005, 03:08 |
|
||
|
Копирование объектов !
|
|||
|---|---|---|---|
|
#18+
Код: plaintext спрафкаThe method clone for class Object performs a specific cloning operation. First, if the class of this object does not implement the interface Cloneable, then a CloneNotSupportedException is thrown. Note that all arrays are considered to implement the interface Cloneable. Otherwise, this method creates a new instance of the class of this object and initializes all its fields with exactly the contents of the corresponding fields of this object, as if by assignment; the contents of the fields are not themselves cloned. Thus, this method performs a "shallow copy" of this object, not a "deep copy" operation. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 21.06.2005, 03:51 |
|
||
|
|

start [/forum/topic.php?desktop=1&fid=59&tid=2152173]: |
0ms |
get settings: |
8ms |
get forum list: |
17ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
86ms |
get topic data: |
10ms |
get forum data: |
3ms |
get page messages: |
27ms |
get tp. blocked users: |
1ms |
| others: | 241ms |
| total: | 401ms |

| 0 / 0 |
