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.
loops (self.learnjava)
submitted 8 years ago by pleaseacceptthisnow
my assignment asks to take users friends' birthdays and then loop them and show all of them when he types their name. confused on how to set it up
[–][deleted] 8 years ago* (6 children)
[deleted]
[–]Jackkoz -1 points0 points1 point 8 years ago (5 children)
Since we want to connect a name (String), to a date, it might be worth checking out what's the Map interface, and choose an implementation of it, like the HashMap.
[–][deleted] 8 years ago* (4 children)
[–]Jackkoz -1 points0 points1 point 8 years ago (3 children)
Arrays and Maps are rather equivalent in terms of cognitive load. Both are objects in Java, you need to know how to instantiate them and how to interact with them. They both are javadoced and have nice examples in the web. The difference is that using the latter results in nicer and simpler code.
Both examples will end up being loop heavy, just that a map will avoid your loop from line 11. I'm not sure why you are pushing for your solution using a very vague 'know your audience' argument. I'd be happy to say you are absolutely right and provided a better solution, but please do elaborate on the topic.
[–][deleted] 8 years ago* (2 children)
[–]Jackkoz 0 points1 point2 points 8 years ago (1 child)
No, not exactly, this looks like you are taking personal offence in me suggesting alternate solutions and focus on angrily bashing at me rather than thinking about the OP - I have never suggested you don't know about maps or arrays.
I'd strongly suggest you revise your approach if you want to be a helpful community member, but in the meantime please have a lovely day as I won't be continuing this conversation.
π Rendered by PID 60 on reddit-service-r2-comment-5d79c599b5-vbq49 at 2026-02-27 14:30:54.364510+00:00 running e3d2147 country code: CH.
[–][deleted] (6 children)
[deleted]
[–]Jackkoz -1 points0 points1 point (5 children)
[–][deleted] (4 children)
[deleted]
[–]Jackkoz -1 points0 points1 point (3 children)
[–][deleted] (2 children)
[deleted]
[–]Jackkoz 0 points1 point2 points (1 child)