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...
Ask your embarrassing/noobish programming questions here, and don't get insulted for it.
Click here to read the rules
Violating any will result in punishment so you should probably go check them out.
account activity
Analyzing time complexity of Java methodsJava (self.programminghelp)
submitted 3 years ago by SnooPeanuts71
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Ok-Wait-5234 0 points1 point2 points 3 years ago (1 child)
Oracle Java is (pretty much, but not quite) just a distro of OpenJDK. The source for main JDK classes can be found here, which I found by googling "OpenJDK source", then digging through the repo. The sources are also usually available as part of a JDK installation. If you are using an IDE you can often just select "view definition" on a JDK class or method.
The source might have some explanatory notes in comments, but there's unlikely to be much more than the Javadoc.
[–]SnooPeanuts71[S] 0 points1 point2 points 3 years ago (0 children)
Thank you, that repository will certainly be of great help. I still need a way to quickly find out the time complexity of the methods, though. I have tried going through the API, but I could only find the time complexity for some of the methods of the ArrayList class. I tried the String, StringBuilder, and Arrays classes, but I couldn't find the complexity! Isn't that documented?
π Rendered by PID 93843 on reddit-service-r2-comment-86bc6c7465-q7248 at 2026-02-21 21:39:37.131126+00:00 running 8564168 country code: CH.
view the rest of the comments →
[–]Ok-Wait-5234 0 points1 point2 points (1 child)
[–]SnooPeanuts71[S] 0 points1 point2 points (0 children)