r/javaexamples • u/Good_Language1763 • Jul 24 '26
r/javaexamples • u/upstream_paddling • Mar 12 '26
Websites with lots of Java nested loops practice problems?
reddit.comr/javaexamples • u/AcanthisittaEmpty985 • Feb 27 '26
Groovy web server with redis and mysql under 60 lines of code
Hi
It's a proof of concept, but it works, with Java 11+ and Groovy 5.0.2
It retrieves values from a GET request.
First it looks into a redis server used as a cache.
First it looks into a redis server used as a cache.
If the data is there, it returns to the client
If not, it access to MySQL to look for the data
If the data is there, it is stored into redis and returned to the client
If not, nothing is returned
Only 60 lines of code, so nothing snappy, but it works
It uses Javalin, Jedis and MySQL driver
r/javaexamples • u/mikelue0627 • Nov 12 '25
Foxglove, an alternative for preparing RDB data for unit tests
Hey guys, I made a library(Foxglove) for generating data on RDB for unit tests.
As an alternative of @Sql, Foxglove would try to generate data of columns automatically.
If you got some tedious or error-prone feeling when authoring INSERT INTO .. for unit tests on RDB, please check out this library.
Example:
import javax.sql.DataSource;
import guru.mikelue.foxglove.jdbc.JdbcTableFacet;
import guru.mikelue.foxglove.jdbc.JdbcDataGenerator;
// Generates 4 rows with "cr_brand "fixed to "Toyota" and
// 4 different values on "cr_model"
var facet = JdbcTableFacet.builder(TABLE_CAR)
.numberOfRows(4)
.column("cr_brand")
.fixed("Toyota")
.column("cr_model")
.roundRobin("Corolla", "Camry", "RAV4", "Prius")
.build();
new JdbcDataGenerator(getDataSource())
.generate(facet);r/javaexamples • u/Limp_Yesterday_4152 • Dec 04 '24
Who has the idea on how to write data persistence and storage for Java
r/javaexamples • u/robertinoc • Sep 06 '24
Deploy Secure Spring Boot Microservices on Azure AKS Using Terraform and Kubernetes
Deploy a cloud-native Java Spring Boot microservice stack secured with Auth0 on Azure AKS using Terraform and Kubernetes.
r/javaexamples • u/javinpaul • Sep 02 '24
Sorting in Java using Comparator and thenComparing() method
I wrote an article about sorting using Comparator and thenComparing() method https://javarevisited.blogspot.com/2021/09/comparator-comparing-thenComparing-example-java-.html
r/javaexamples • u/johnmc325 • Aug 17 '24
Showcase Weblog Analyser Java Desktop Application
A whilst stop tour of Weblog Analyser built using Java with JavaFX as a desktop application.
r/javaexamples • u/robertinoc • Apr 12 '24
Add Security and Authorization to a Java Spring Boot API
Learn how to use Spring Boot, Java, and Auth0 to secure a feature-complete API by implementing authorization in Spring Boot with Auth0.
Read more…
r/javaexamples • u/shubhcool • Jan 04 '24
No body in method in class files
Hi, While traversing through code, I came across one class where the constructor and method bodies have this , /* Compiled code*/ in intellij idea. This is not the case with other team members system. I tried to cross verify the settings in the intellij but couldn't get anything which could solve my issue. Project is Spring MVC project. Using Jdk1.8 . Intelliij is Ultimate 2023 latest version.
r/javaexamples • u/robertinoc • Dec 13 '23
Identity in Spring Boot with Kubernetes, Keycloak, and Auth0
A walk-through of building a microservices architecture with JHipster, Keycloak, Auth0, and Google Kubernetes Engine (GKE) deployment.
Read more…
r/javaexamples • u/luke_rola • Nov 24 '23
Troubleshooting StackOverflowException in Java Recursion: Tips and Tricks
What should you do when your recursive algorithm reaches the recursion limit in a specified JVM target, resulting in a StackOverflowException?🤔
Join us in the latest episode of 'Java Puzzle of the Week' 🧩 as we delve into four possible solutions to tackle this issue.
https://youtu.be/muwv8l4-aWg?si=Jy1JPj7chitvyUKe
r/javaexamples • u/Rama_jovial • Nov 11 '23
Abstract factory design pattern in java
Abstract factory design pattern in java complete step by step tutorial
r/javaexamples • u/luke_rola • Nov 03 '23
Double arithmetic
Explore the intricacies of Java doubles in the latest episode of 'Java Puzzle of the Week.' 🧩🔍 We delve into their internals and discuss why they might not be the best choice for financial operations. Don't miss this intriguing exploration!
r/javaexamples • u/robertinoc • Oct 31 '23
How to Build a GraphQL API with Spring Boot
A step-by-step guide for building a secured GraphQL API with Spring Boot and Auth0 authentication in React
Read more…
r/javaexamples • u/robertinoc • Oct 31 '23
How to Build a GraphQL API with Spring Boot
A step-by-step guide for building a secured GraphQL API with Spring Boot and Auth0 authentication in React
Read more…
r/javaexamples • u/luke_rola • Oct 26 '23
String uppercase
Did you know that string transformations like toUpperCase and toLowerCase can work differently for different locales and may even affect the length of a given string? Discover more insights in the latest episode of "Java Puzzle of the Week."
r/javaexamples • u/luke_rola • Oct 18 '23
Numeric overflow in Java
Numeric overflow occurs when the value of a numeric type exceeds its defined range, often leading to unexpected and potentially problematic outcomes. For a clear and concise explanation, I prepared a short YouTube video on this topic.
r/javaexamples • u/luke_rola • Oct 05 '23
Java heap pollution
Have you heard about Java heap pollution? 🚀 It's an intriguing issue in the world of Java programming. If you're curious to learn more, check out the latest episode of 'Java Puzzle of the Week' 🧩 where we explore this topic. Your thoughts and insights are welcome!
https://www.youtube.com/watch?v=-PXkz8MzCp0
r/javaexamples • u/[deleted] • Sep 20 '23
dsa preparation problesm
so to practice dsa , which platform is best ?
im beginner 2nd yr in my btech, so
leetcode or codechef or gfg or ??
r/javaexamples • u/luke_rola • Sep 07 '23
A simple Java integer comparison - Programming Puzzle of the Week
Hello, I've started contributing to a new YouTube series called "Java Puzzle of the Week." 🧩
In this series, I'll delve into short Java code snippets with varying levels of difficulty. 🤓
The first episode tackles integer comparisons. New episodes will appear at every Thursday.
If you're interested, I'd love for you to check it out!
r/javaexamples • u/robertinoc • Jun 27 '23
Get started with Spring Boot and Auth0
Learn how to add Auth0 to your Spring Boot application using the Okta Spring Boot Starter.
Read more…