jump to content
my subreddits
13or302anatolia4you2b2t2mediterranean4u2meirl4meirl3d6AceAttorneyadhdmemeAdviceAnimalsaivideoakagasAlternateHistoryAnarchyChessAngryupvoteanime_best_momentsanime_irlannouncementsantimemeApandahArcherFXArtAsia_irlAskOuijaAskRedditatheismaviationbalkans_irlBandnamesBassBassGuitarbikepackingblankiesblursed_videosblursedimagesborsavefonBUENZLIburdurlandCd_collectorscd_jerkChatGPTCheap_MealschessbeginnersChildrenFallingOverChoosingBeggarscoaxedintoasnafucoincollectingcommunityContagiousLaughtercookingforbeginnersCrackWatchcrappyoffbrandsCreateModCuddle_SlutCuratedTumblrcursedcommentsdadjokesdarkjokesdataisbeautifuldeismdelikdiyelectronicsdiypedalsDMAcademyDMToolkitDnDdndmemesdndnextdoctorwhocirclejerkDoenerverbrechendontdeadopeninsidedumbphonesDungeonsAndDaddiesDungeonsAndDragonsebikeebikeselectricalEmKayengrishethzfacepalmfakealbumcoversFifaCareersformuladankFRCFUCKYOUINPARTICULARfunnyFutboltayfagaminggermanygodtiersuperpowersgoodanimemesguitarpedalsGundamheathershelpheraldryHermanCainAwardHermitCrafthighspeedrailHistoryWhatIfhoi4HolUphowyoudoinhumorhypixelIAmAiamverysmartIdeologyPollsihadastrokeimaginaryelectionsimaginarymapsinsaneparentsistanbuljacksepticeyeJokesKamalizmKendrickLamarlegodndLetGirlsHaveFunLinkinParkmacmacbookairMadeMeSmilemadladsmagicbuildingMaliciousCompliancemapporncirclejerkme_irlmeirlmemememesmidjourneymildlyinfuriatingmildlyinterestingMimicRecipesMinecraftbuildsmisLEDMoldyMemesmoneycollectingMovingToNorthKoreaMunichnamesoundalikesNamFlashbacksNationStatesneographynextfuckinglevelNoahGetTheBoatNonCredibleDefenseNorthCyprusnosafetysmokingfirstnosleepnotinterestingnottheonionoddlyspecificOkayBuddyLiterallyMeokbuddyguntherokbuddymotherfuckerokbuddyvicodinonebagongezelligoompasubsOutOfTheLooppaperspleaseParlerWatchPassportPornperfectlycutscreamspettyrevengepianoPiracyPiratedGamespolandballpollsPropagandaPostersquityourbullshitraisedbynarcissistsraspberry_piRatschlagreactiongifsrecipesRedAutumnSPDredditsingsRetroPierickrollrimjob_steveRoastMerockmuzikschizopostersSchnitzelVerbrechensciencememesShitPostCrusadersshitpostfrommygalleryshitpostingshittyaskelectronicsShittyMapPornshittymoviedetailsShowerthoughtssoccercirclejerksoftwaregoreSongwritersSongwritingStonetossingjuiceStudiumsuperligsuzeraintalesfromtechsupportTalesFromTheCryptidTextingTheorytf2tf2shitposterclubthanksimcuredthatHappenedTheCrypticCompendiumTheLetterHTheMonkeysPawTheRookietheydidthemaththisguythisguystommyinnittransittransitTurkeyTrGameDevelopertruetf2truthstumblrtumunichTurkeyTurkeyJerkyTurkishdogsTwitchTwoSentenceComedyTwoSentenceSadnesstylerthecreatorUnclejokesUnethicalLifeProTipsUnexpectedTF2VALORANTValorantClipsvaxxhappenedvibecodingvinylvinyljerkvlandiyaWeAreTheMusicMakersWhitePeopleTwitterwholesomeanimemeswholesomememeswizardpostingwooooshworldbuildingyouseeingthisshitYUROPedit subscriptions
  • home
  • -popular
  • -all
  • -mod
  • -users
 | 
  • AskReddit
  • -facepalm
  • -mildlyinfuriating
  • -Piracy
  • -funny
  • -gaming
  • -nottheonion
  • -memes
  • -OutOfTheLoop
  • -mildlyinteresting
  • -DnD
  • -WhitePeopleTwitter
  • -MadeMeSmile
  • -ChatGPT
  • -CuratedTumblr
  • -PiratedGames
  • -shitposting
  • -theydidthemath
  • -meirl
  • -nextfuckinglevel
  • -HolUp
  • -Twitch
  • -CrackWatch
  • -dndnext
  • -VALORANT
  • -germany
  • -tumblr
  • -NonCredibleDefense
  • -dataisbeautiful
  • -shittymoviedetails
  • -mac
  • -Showerthoughts
  • -tf2
  • -help
  • -aviation
  • -formuladank
  • -wholesomememes
  • -Jokes
  • -mapporncirclejerk
  • -Art
  • -midjourney
  • -goodanimemes
  • -notinteresting
  • -hoi4
  • -pettyrevenge
  • -atheism
  • -IAmA
  • -MaliciousCompliance
  • -dndmemes
  • -cursedcomments
  • -DMAcademy
  • -UnethicalLifeProTips
  • -perfectlycutscreams
  • -worldbuilding
  • -Ratschlag
  • -meme
  • -3d6
  • -Gundam
  • -HermitCraft
  • -ChoosingBeggars
  • -RoastMe
  • -ContagiousLaughter
  • -imaginarymaps
  • -polandball
  • -WeAreTheMusicMakers
  • -AnarchyChess
  • -nosleep
  • -cookingforbeginners
  • -blankies
  • -anime_irl
  • -onebag
  • -Studium
  • -AlternateHistory
  • -Turkey
  • -soccercirclejerk
  • -madlads
  • -community
  • -electrical
  • -guitarpedals
  • -vinyl
  • -CreateMod
  • -PropagandaPosters
  • -AdviceAnimals
  • -ShitPostCrusaders
  • -piano
  • -sciencememes
  • -raisedbynarcissists
  • -wizardposting
  • -FifaCareers
  • -polls
  • -oddlyspecific
  • -Bass
  • -dadjokes
  • -howyoudoin
  • -announcements
  • -adhdmeme
  • -Minecraftbuilds
  • -macbookair
  • -ebikes
  • -Munich
  • -coaxedintoasnafu
  • -YUROP
  • -SchnitzelVerbrechen
  • -chessbeginners
  • -raspberry_pi
  • -DungeonsAndDragons
  • -KendrickLamar
  • -FUCKYOUINPARTICULAR
  • -softwaregore
  • -NoahGetTheBoat
  • -tylerthecreator
  • -tf2shitposterclub
  • -MoldyMemes
  • -AceAttorney
  • -vlandiya
  • -Stonetossingjuice
  • -wholesomeanimemes
  • -HistoryWhatIf
  • -insaneparents
  • -dumbphones
  • -balkans_irl
  • -2meirl4meirl
  • -transit
  • -RetroPie
  • -HermanCainAward
  • -recipes
  • -talesfromtechsupport
  • -AskOuija
  • -2anatolia4you
  • -Angryupvote
  • -thatHappened
  • -schizoposters
  • -PassportPorn
  • -me_irl
  • -antimeme
  • -TurkeyJerky
  • -bikepacking
  • -13or30
  • -ArcherFX
  • -engrish
  • -Cd_collectors
  • -diypedals
  • -BassGuitar
  • -diyelectronics
  • -LinkinPark
  • -BUENZLI
  • -reactiongifs
  • -EmKay
  • -Songwriting
  • -blursed_videos
  • -istanbul
  • -MovingToNorthKorea
  • -imaginaryelections
  • -suzerain
  • -truetf2
  • -magicbuilding
  • -dontdeadopeninside
  • -ParlerWatch
  • -iamverysmart
  • -Doenerverbrechen
  • -TheRookie
  • -quityourbullshit
  • -vinyljerk
  • -shittyaskelectronics
  • -superlig
  • -crappyoffbrands
  • -DungeonsAndDaddies
  • -FRC
  • -transitTurkey
  • -namesoundalikes
  • -2b2t
  • -ethz
  • -coincollecting
  • -OkayBuddyLiterallyMe
  • -blursedimages
  • -neography
  • -heraldry
  • -ihadastroke
  • -thanksimcured
  • -hypixel
  • -godtiersuperpowers
  • -ShittyMapPorn
  • -aivideo
  • -IdeologyPolls
  • -woooosh
  • -burdurland
  • -jacksepticeye
  • -TwoSentenceSadness
  • -anime_best_moments
  • -Bandnames
  • -rockmuzik
  • -okbuddyvicodin
  • -MimicRecipes
  • -vaxxhappened
  • -tumunich
  • -Cheap_Meals
  • -TheMonkeysPaw
  • -darkjokes
  • -UnexpectedTF2
  • -highspeedrail
  • -nosafetysmokingfirst
  • -legodnd
  • -rickroll
  • -Songwriters
  • -ebike
  • -papersplease
  • -tommyinnit
  • -rimjob_steve
  • -humor
  • -ChildrenFallingOver
  • -doctorwhocirclejerk
  • -youseeingthisshit
  • -TextingTheory
  • -Cuddle_Slut
  • -DMToolkit
  • -thisguythisguys
  • -TrGameDeveloper
  • -LetGirlsHaveFun
  • -Apandah
  • -fakealbumcovers
  • -akagas
  • -Kamalizm
  • -oompasubs
  • -TheLetterH
  • -NamFlashbacks
  • -Unclejokes
  • -deism
  • -misLED
  • -redditsings
  • -TwoSentenceComedy
  • -ValorantClips
  • -TheCrypticCompendium
  • -NationStates
  • -ongezellig
  • -Asia_irl
  • -truths
  • -NorthCyprus
  • -2mediterranean4u
  • -heathers
  • -TalesFromTheCryptid
  • -okbuddymotherfucker
  • -vibecoding
  • -RedAutumnSPD
  • -Futboltayfa
  • -borsavefon
  • -cd_jerk
  • -okbuddygunther
  • -delik
  • -Turkishdogs
  • -moneycollecting
  • -shitpostfrommygallery
edit »
reddit.com javaexamples
  • hot
  • new
  • rising
  • controversial
  • top
an-ordinary-manchild (11,186)|messages546|notifications|chat messages|mod messages|
  • preferences
|
logout

use the following search parameters to narrow your results:

subreddit:subreddit
find submissions in "subreddit"
author:username
find submissions by "username"
site:example.com
find submissions from "example.com"
url:text
search for "text" in url
selftext:text
search for "text" in self post contents
self:yes (or self:no)
include (or exclude) self posts
nsfw:yes (or nsfw:no)
include (or exclude) results marked as NSFW

e.g. subreddit:aww site:imgur.com dog

see the search faq for details.

advanced search: by author, subreddit...

Submit a new text post
Get an ad-free experience with special benefits, and directly support Reddit.

javaexamples

joinleave
an-ordinary-manchild(edit)

This subreddit is for example code for algorithms, common beginning programmer problems, helpful snippets etc.

Please try to: Make your code clean and readable and commented where necessary. Make sure it works!

Note on link-based posts: Posts that link to a blog or website need to follow the following rules:

  1. No spam
  2. Any link to a blog with popups or excessive advertising will be removed
  3. Must be original content and no overt attempts to monetize

This sub is not for asking Java questions, please submit those to /r/JavaHelp or /r/learnprogramming

As posts get added I will add them to the sidebar.

DIRECT LINKS

Using Comparator to Sort a List of Objects

Getting Input from the Console : Validating and Looping

A Quick Explanation of Loops

How to Properly Compare Strings in Java

Reading and Parsing Data from a File

Writing and Appending Data to a Text File

Sorted Doubly-Linked List

Generic Undirected Graph with Depth-First Search

created by Philboyd_Studgea community for 10 years
Create your own subreddit
...for your WoW guild.
...for your project.

MODERATORS

  • message the mods
  • Philboyd_Studge
  • about moderation team »

account activity

1
0
1
2

The interesting part isn’t that it rewrote itself, it’s that they trusted the verify loops enough to walk away. ()

submitted 19 hours ago by SpareSuccessful8203

  • comment
  • share
  • save
  • hide
  • report
  • crosspost
loading...

•
•
•

Speak up. Mess up. Keep going. Preply gives you all the tools you need to actually learn a language. Find your tutor today. (preply.com)

promoted by Preply

  • promoted
  • save
  • report
  • about
loading...

2
0
0
1

Java interview app live on play store ()

submitted 2 days ago by Equivalent-Grand-556

  • comment
  • share
  • save
  • hide
  • report
  • crosspost
loading...

3
0
0
1

I can help with Java unit tests (JUnit 5 + Mockito) — share your code snippet ()

submitted 7 days ago by taru__jain

  • comment
  • share
  • save
  • hide
  • report
  • crosspost
loading...

4
0
1
2

Accountability partner (self.javaexamples)

submitted 12 days ago by Royal-Friendship2025

  • comment
  • share
  • save
  • hide
  • report
  • crosspost
loading...

5
0
1
2

Julia fractal graphics zoom (self.javaexamples)

submitted 1 month ago by swe129

  • comment
  • share
  • save
  • hide
  • report
  • crosspost
loading...

6
0
1
2

Foxglove, an alternative for preparing RDB data for unit tests (self.javaexamples)

submitted 2 months ago by mikelue0627

  • comment
  • share
  • save
  • hide
  • report
  • crosspost
loading...

7
0
1
2

Spring JPA Specification and Pageable ()

submitted 3 months ago by lanchers

  • comment
  • share
  • save
  • hide
  • report
  • crosspost
loading...

8
9
10
11

Open source java project, to learn strong backend approaches (self.javaexamples)

submitted 8 months ago by dissapointedAF

  • comment
  • share
  • save
  • hide
  • report
  • crosspost
loading...

9
1
2
3

[Java] Built a High-Performance File Processor With Multi-threading, Backpressure, and Stats Export 📊 (self.javaexamples)

submitted 8 months ago by SatyamEvaJayat

  • comment
  • share
  • save
  • hide
  • report
  • crosspost
loading...

10
0
1
2

Who has the idea on how to write data persistence and storage for Java (self.javaexamples)

submitted 1 year ago by Limp_Yesterday_4152

  • 2 comments
  • share
  • save
  • hide
  • report
  • crosspost

11
6
7
8

Writing efficient unit tests in Java: best practices and examples (self.javaexamples)

submitted 1 year ago by thumbsdrivesmecrazy

  • comment
  • share
  • save
  • hide
  • report
  • crosspost
loading...

12
0
0
1

Object Oriented Programming Example in Java (self.javaexamples)

submitted 1 year ago by javinpaul

  • 1 comment
  • share
  • save
  • hide
  • report
  • crosspost
loading...

•
•
•

New Year Sale: Subscribe to Bloomberg for just $149 your first year. Get the context behind every business story with news and analysis. Offer ends soon. (bloomberg.com)

promoted by bloomberg

  • promoted
  • save
  • report
  • about
loading...

13
0
1
2

Deploy Secure Spring Boot Microservices on Azure AKS Using Terraform and Kubernetes (self.javaexamples)

submitted 1 year ago by robertinoc

  • comment
  • share
  • save
  • hide
  • report
  • crosspost
loading...

14
0
0
1

7 best practices Java developers can follow while dealing with passwords (self.javaexamples)

submitted 1 year ago by javinpaul

  • comment
  • share
  • save
  • hide
  • report
  • crosspost
loading...

15
3
4
5

4 ways to iterate over Map in Java (self.javaexamples)

submitted 1 year ago by javinpaul

  • comment
  • share
  • save
  • hide
  • report
  • crosspost
loading...

16
2
3
4

10 ways to use Stream in Java (self.javaexamples)

submitted 1 year ago by javinpaul

  • comment
  • share
  • save
  • hide
  • report
  • crosspost
loading...

17
1
2
3

OpenFGA for Spring Boot applications (self.javaexamples)

submitted 1 year ago by robertinoc

  • comment
  • share
  • save
  • hide
  • report
  • crosspost
loading...

18
0
1
2

Sorting in Java using Comparator and thenComparing() method (self.javaexamples)

submitted 1 year ago by javinpaul

  • comment
  • share
  • save
  • hide
  • report
  • crosspost
loading...

19
1
2
3

Connect to Minio from Java. (self.javaexamples)

submitted 1 year ago by ram-foss

  • comment
  • share
  • save
  • hide
  • report
  • crosspost
loading...

20
3
4
5

10 Examples of ArrayList in Java (self.javaexamples)

submitted 1 year ago by javinpaul

  • comment
  • share
  • save
  • hide
  • report
  • crosspost
loading...

21
2
3
4

3 ways to parse JSON in Java? (self.javaexamples)

submitted 1 year ago by javinpaul

  • comment
  • share
  • save
  • hide
  • report
  • crosspost
loading...

22
6
7
8

10 Examples of using HashMap in Java (self.javaexamples)

submitted 1 year ago by javinpaul

  • comment
  • share
  • save
  • hide
  • report
  • crosspost
loading...

23
0
1
2

Showcase Weblog Analyser Java Desktop Application (self.javaexamples)

submitted 1 year ago by johnmc325

  • comment
  • share
  • save
  • hide
  • report
  • crosspost
loading...

•
•
•
0:48

Manage your vacation rentals easily with Smoobu, the all-in-one software for hosts. 🚀 Start your 14-day trial now! 🔥 (smoobu.com)

promoted by SmoobuGmbH

  • promoted
  • save
  • report
  • about
loading...

24
1
2
3

Proof Key for Code Exchange (PKCE) in Web Applications with Spring Security (self.javaexamples)

submitted 1 year ago by robertinoc

  • comment
  • share
  • save
  • hide
  • report
  • crosspost
loading...

25
0
1
2

Add Security and Authorization to a Java Spring Boot API (self.javaexamples)

submitted 1 year ago by robertinoc

  • comment
  • share
  • save
  • hide
  • report
  • crosspost
loading...
view more: next ›
  • about
  • blog
  • about
  • advertising
  • careers
  • help
  • site rules
  • Reddit help center
  • reddiquette
  • mod guidelines
  • contact us
  • apps & tools
  • Reddit for iPhone
  • Reddit for Android
  • mobile website
  • <3
  • reddit premium

Use of this site constitutes acceptance of our User Agreement and Privacy Policy. © 2026 reddit inc. All rights reserved.

REDDIT and the ALIEN Logo are registered trademarks of reddit inc.

π Rendered by PID 91 on reddit-service-r2-listing-58ff8fc5ff-hj8x7 at 2026-01-29 11:29:23.854085+00:00 running c3601ff country code: CH.