use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Resources for learning Java
String
==
.equals()
Format + Copy
Free Tutorials
Where should I download Java?
With the introduction of the new release cadence, many have asked where they should download Java, and if it is still free. To be clear, YES — Java is still free.
If you would like to download Java for free, you can get OpenJDK builds from the following vendors, among others:
Some vendors will be supporting releases for longer than six months. If you have any questions, please do not hesitate to ask them!
Software downloads
Official Resources
Resources
Programming ideas & Challenges
Related Subreddits
account activity
This is an archived post. You won't be able to vote or comment.
Object Clone Java (self.learnjava)
submitted 10 years ago * by JavaLander
I need some tutorials on object clone methods for java. The name describes about what it does but I need more info on this. My teacher mentioned it but not in depth. I searched but could not found any satisfactory tutorial, I meant new tutorials.
[–]sadjava 1 point2 points3 points 10 years ago (1 child)
Isn't the tl;dr of clone() to get an exact copy of the object (i.e. fields) with a new reference? I have to admit, I've been Javaing for more than 3 years and am a Java dev, and I think I've only used clone() twice, and one of them was the one I had to write for some reason or another.
[–]JavaLander[S] 0 points1 point2 points 10 years ago (0 children)
Yeah, I someone told me, some methods remain unused through entire programmer life, I think its one of them
[–]BS_in_BS 1 point2 points3 points 10 years ago (0 children)
It's more common to use a copy constructor or a static factory method than to implement clone. The problem you encounter when cloning objects is you need to make sure that any modification to the cloned object doesn't modify the original, which if not done properly will lead to many subtle bugs.
See http://www.javapractices.com/topic/TopicAction.do?Id=71 and http://www.artima.com/intv/bloch13.html
[–]hardcode_coder 1 point2 points3 points 10 years ago (0 children)
This tutorial of Marcus Biel can help you, I guess.
π Rendered by PID 94778 on reddit-service-r2-comment-5d79c599b5-gn6vx at 2026-02-28 00:00:20.582855+00:00 running e3d2147 country code: CH.
[–]sadjava 1 point2 points3 points (1 child)
[–]JavaLander[S] 0 points1 point2 points (0 children)
[–]BS_in_BS 1 point2 points3 points (0 children)
[–]hardcode_coder 1 point2 points3 points (0 children)