need to know how to do this for a friend, he said he searched for a tut but couldn't find anything he needed to do so, let me know!
![[Image: 4DjkBBj.jpg]](https://i.imgur.com/4DjkBBj.jpg)
|
Java
How do I swap object references in java? |
(Sep 26, 2016 11:06 AM)Jire Wrote: Code Object tempObj = obj1;he tried this but it wont work showing an as example ![]()
Sep 26, 2016 11:36 AM
(This post was last modified: Sep 26, 2016 11:36 AM by minimalist.)
(Sep 26, 2016 11:16 AM)Мишка Wrote: That's because he's making references to an object and variables that don't exist; should be: Code public static void main (String[] args) {I don't middleman any deals on- or off-site. Please don't message me requesting my past services and certainly don't fall for anybody who claims to be me.
(Sep 26, 2016 11:36 AM)minimalist Wrote: That's because he's making references to an object and variables that don't exist; should be: The Object class already exists (java.lang.Object), so you don't need another class for it. But OP, you provided the correct solution yourself. |
|
|
| Possibly Related Threads... | |||
| Thread / Author | Replies | Views | Last Post |
| [C#] by LuunaJan 21, 2022 10:13 AM | 0 | 114 |
Jan 21, 2022 10:13 AM Last Post: Luuna |
| [Python] by CryptJan 19, 2021 10:40 AM | 11 | 384 |
Jan 19, 2021 10:40 AM Last Post: ThinWhiteDuke |
| [Java] by deadsh0tJan 10, 2019 07:30 AM | 2 | 170 |
Jan 10, 2019 07:30 AM Last Post: deadsh0t |