r/JavaProgramming

How to prove java string immutability via code? Asked in recent interview.

Interviewer asked me to prove that Java Strings are immutable.

I couldn't bring myself to simply concatenate a String and print it, because concat() returns a new String rather than modifying the original.

Then I thought hash codes might help, but the interviewer stopped me there, pointing out that different Strings can have different hash codes anyway.

If we could access Java's underlying memory directly, I could prove that the original String object remains unchanged. But without going that deep, is there any other convincing way to demonstrate String immutability?

What would you have answered?

reddit.com
u/Individual-Corgi6109 — 23 hours ago

He canceled our third date last minute, should

Said something came up at work, apologized a lot, offered to reschedule right away. First two dates were genuinely great. Is one cancellation with a good excuse worth writing someone off or should I give it another shot?

reddit.com
u/jrkmk20268186 — 1 day ago
▲ 10 r/JavaProgramming+1 crossposts

Need expert advice on java

Hey, I'm new to this community I'm a lone coder and fresh graduate know java and manageable springboot knowledge. I have lot of doubt about the reality of java developers, scope, carrier path to focus kind of doubts... If there's any experts with java and springboot knowledge I request them for a short one on one conversation if u are interested in helping me

Thank you..

reddit.com
u/Square_Persimmon_255 — 2 days ago
▲ 5 r/JavaProgramming+2 crossposts

MCP Apps with Java: sharing application state between the model and a live UI

One interesting part of MCP Apps is that the UI doesn’t have to be a disposable interface generated for a single model response.

I’ve been experimenting with this from the Java side using Spring Boot, Spring AI and webforJ.

The architecture is roughly:

MCP host -> tool call -> Java application -> rendered view

A routed Java view is exposed as both an MCP tool and UI resource. The same route can still run as a normal application in the browser.

The more interesting part is what happens after the view opens.

Additional MCP tools can target the rendered view associated with the same MCP session. A tool call can therefore modify the state of the application the user is currently looking at rather than returning another detached result.

Communication also goes the other way. When the user interacts with the Java UI, the application can update the model context. For example, selecting rows or changing a filter can change what information is available to the model without adding another visible chat message.

That makes the interaction roughly:

prompt -> MCP tool -> Java view -> user interaction -> model context

For example, an invoice application can expose an operation that opens its invoice route with an overdue filter. Once open, another tool can change the same view to display an aging chart. The user can then manually change the selection and make only those selected invoices available for further analysis.

The application itself remains a Java application. Spring Boot runs it, Spring AI provides the MCP server integration, and webforJ handles the UI.

I work on webforJ, for disclosure. The implementation and API are documented here:
https://docs.webforj.com/docs/integrations/mcp-apps/overview

I’m curious what people think about this interaction model. In particular, whether sharing one live application state between the human UI and model feels more useful than having the model generate a separate UI/result each time.

github.com

I need a bit of help…

Howdy! I’m a VERYYY new programmer, and one of my assignments to learn Java is to print ASCII art of a fish, and as dumb as this sounds, I can’t figure it out for the life of me!

You see, the assignments makes it so I have directly copy the fish, and the fish they gave me uses a “\” and quotation in the same line, and exertions I attempt to print, it flags it as an “Illegal character”

Is there anyway I can work around this? Or is it truly impossible. I REALLY hope for prior but I definitely expect the latter…

reddit.com
u/FloppaXR — 2 days ago
▲ 149 r/JavaProgramming+1 crossposts

Spring FlashAPI

Done writing the same CRUD boilerplate for every Spring project.
FlashAPI is coming to the Java/Spring ecosystem, much to the delight of Java developers.
Introducing Spring FlashAPI.
The idea is exactly the same as the Python version:
You define your JPA entities.
FlashAPI takes care of the REST boilerplate.
From a simple entity, you can automatically get:
CRUD
Pagination
Search & dynamic filters
Sorting
CSV / Excel / PDF exports
Bulk operations
Relationships & expand
Soft delete
Audit trail
Rate limiting
OpenAPI / Swagger
Webhooks
WebSocket events
Access control
Multi-tenancy
And most importantly, FlashAPI doesn’t try to take control of your application.
You can start with zero boilerplate, then gradually take back control of your business logic, services, and controllers.
The goal is simple:
Less repetitive CRUD, more time to build your product.
Spring FlashAPI is open source under the Apache 2.0 license.
Java 21+
Spring Boot 3.2+
Spring Data JPA
👉🏽 GitHub: github.com/HackermanMe/spring-flashapi
I’m looking for developers willing to give it a try — and, most importantly, tell me:
What is actually useful… and what isn’t?
#Java #Spring #SpringBoot #JPA #OpenSource #Backend #RESTAPI #SoftwareEngineering

u/rakakayiouu — 5 days ago

Final-year CS student targeting Fintech Backend — what should I learn beyond Java + Spring Boot?

Hey everyone! Is anyone here currently working in fintech, particularly in backend/software engineering?

I’m a final-year CS student and I’m currently focusing on Java + Spring Boot with the goal of getting into fintech backend development.

I’d really appreciate guidance from someone already in the industry, especially around:

  • What skills and technologies fintech companies actually look for in fresh graduates
  • What fintech-specific concepts I should learn
  • What kind of projects would make my profile stronger
  • How a fresher can break into fintech roles
  • Anything you wish you had learned before entering fintech

If anyone here works in fintech and wouldn’t mind sharing their experience, I’d really appreciate it. Thanks!

reddit.com
u/malphas_x — 4 days ago
▲ 7 r/JavaProgramming+2 crossposts

Reliable Next.js On-Demand ISR: Handling Contentful & Sanity Webhooks Without Stale Content

Pairing a headless CMS like Contentful or Sanity with Next.js is a common way to get the speed of static generation with the flexibility of a real content workflow. With on-demand Incremental Static Regeneration (ISR), an editor publishes something, a webhook fires, and Next.js purges the cache for that page. Read th complete article here - https://instawebhook.com/blog/reliable-next-js-on-demand-isr-handling-contentful-sanity-webhooks-without-stale

In production, this chain breaks mor e often than the happy-path diagrams suggest. Webhooks get dropped, functions cold-start past the response window, deploys reject traffic for a few seconds, and an editor ends up asking why their update isn't live.

This piece looks at why direct CMS-to-Next.js webhooks fail, what Contentful's and Sanity's actual delivery guarantees are (verified against their current docs, not folklore), and how putting a small intake layer in front of your revalidation endpoint closes most of the gap. It also updates a few "well-known" limits — Vercel's function timeout in particular — that have changed recently enough that older advice is now wrong.

u/JadeLuxe — 3 days ago
▲ 6 r/JavaProgramming+4 crossposts

Looking for Backend/Java opportunities | 4.5+ YOE | Java, Spring Boot | Fintech/Payments

Hi everyone,
I’m currently looking for a new Backend/Java opportunity and would really appreciate referrals or leads.
I have 4.5+ years of experience and currently work as a Backend Software Engineer at a product-based fintech company. My main stack is Java, Spring Boot, Kafka, PostgreSQL, Redis, Docker, Kubernetes and microservices.
My current work is around payment orchestration and PSP integrations. I’ve worked on 180+ payment providers and built a configuration-driven integration/transformation layer to reduce the amount of custom code needed for new integrations. I’ve also been involved in our Java 8 → Java 21 and Spring Boot 2.3 → 3.4 migration.
Apart from development, I take ownership of technical design, PR reviews, mentoring, production issues and release cycles.
I’m looking for Backend Engineer / Software Engineer / Senior Java Developer roles, preferably in product companies, fintech/payments, SaaS or backend infrastructure. I’m open to opportunities across India and also interested in relocation opportunities such as Malaysia/UAE.
The reason I’m actively looking now is that an increment discussed with my management around 3 months ago is still pending, and there have also been layoffs recently. I was initially planning to continue with the company, but the uncertainty around growth and stability has made me start looking seriously.
If your company is hiring for a suitable Java/Backend role, or if you can refer me internally, I’d really appreciate it. Happy to share my resume over DM.
Thanks!

Here is my
resume

reddit.com
u/Rich_Bike5279 — 4 days ago

Currently learning java, just showcasing a simple application i'm proud of

https://preview.redd.it/m5xi8uymkfjh1.png?width=1920&format=png&auto=webp&s=d13e57b4773cecdb388dc0f8e97baaaf83cf41fa

Apparently I'm bringing back memories by using Swing and AWT. 4 people thus far have said they've not heard of these in years. Humble beginnings though; i plan on making some video games, plus its just generally helpful to be able to create my own applications

reddit.com
u/Silver_Lined_Bullet — 6 days ago
▲ 7 r/JavaProgramming+2 crossposts

Looking for pattern-wise Java DSA questions/ resources

Hey everyone! I'm looking for pattern-wise Java DSA questions to practice.

If anyone has created their own pattern-based question list, I'd really appreciate it if you could share it. Otherwise, please recommend any good YouTube channels or other resources for this.

Thanks in advance!

reddit.com
u/purvigupta03 — 5 days ago
▲ 315 r/JavaProgramming+3 crossposts

Apache Fory™ JSON: 10x Faster JSON Serialization Framework for Java

Apache Fory JSON is a high-performance JSON serialization framework for Java. It maps Java objects to and from standard JSON text and UTF-8 bytes.

In the published benchmarks, it reaches up to 10.91× Jackson’s throughput and 10.89× Gson’s in java-json-benchmark, and up to 5.55× and 10.00× respectively in the jvm-serializers MediaContent benchmark.

It supports JDK 8+, Android, and GraalVM Native Image. JDK17+ Record is also supported.

fory.apache.org
u/Shawn-Yang25 — 9 days ago
▲ 6 r/JavaProgramming+1 crossposts

can someone help with capgemini java full stack traning assesment and insights please.

Hi Everyone ,
i recently joined capgemini as analyst and got stream java full stack can someone help me with the process of traning what type or questions will be there
and where can i practice the questions for it
are there any dumps or any useful link available ... can someone please help i am lil tensed and afraid .. my m1 exam is near and i am from python got stream as java.

guys please help.

reddit.com
u/Miserable-Host-73 — 6 days ago
▲ 5 r/JavaProgramming+1 crossposts

DSA with Java suggestion

Hey I am confusing to finding a good YouTube channel for Java with DSA with easy understanding so anyone would suggest me some best free YouTube channel for placements season actually I am final year student and I am starting from basics

reddit.com
u/Full-Cycle-1021 — 7 days ago

Why is java so fucking hard for no reason?

Uni kind of loves java, using it as the default language in every module, except modules specifically around a language.

Currently struggling building a compiler with it... focus is more on working around java and the forced oop, managing state and getting fucked by gradle.

Have tests, that refuse to exit, can't be killed by the user, as they fork infinite and need to be killed with root, then the entire tooling falls apart and needs fixing.

Also for base functions you need to transform lists to streams and back to lists. Logic gets lost in boilerplate and overly verbose code.

I normally use languages like c and haskell, everyone always tells you, that they are much harder, than java, but can't agree at all

Is java supposed to be such a cluster fuck or am I missing something?

Also any idea, why char to char comparison sometimes fails, but char to hex works always?

Is this some random java thing or just my env?

reddit.com
u/ExtraTNT — 9 days ago

Koi pls bata sakta

Samajh nhi aara mai dsa in Java shuru ki apna college se lekin mai bhul hi jata code baar baar mujhe logic pata h ki loop h and butterfly h lekin code yadd ni rehta

reddit.com
u/Aggravating-Shoe-831 — 7 days ago

Just Do It

I'm looking for 2–3 developers interested in building a production-style Java/Spring Boot project together. The goal is to simulate a real software engineering team: Git/GitHub, issues, branches, pull requests, code reviews, testing, Docker, PostgreSQL, CI/CD, etc.

reddit.com
u/ziad1822004 — 10 days ago
▲ 20 r/JavaProgramming+1 crossposts

Color Conversion Library in Java

Not sure if this is the proper community for this post, but I like to do some small image editing projects from time to time, mainly non real time 2D image processing stuff, mostly for curiosity and to learn. And since I mostly program in Java, I'm not sure how useful this will be for the people in this sub.

Recently while working on my own UI wrapper for my Java projects, I noticed a lack of an easy to use and extensive color conversion library for Java. Most of the ones out there are bloated with extra stuff, not easily modular, lacking useful data or simply not pure Java.

The JDK built-in java.awt.color.ColorSpace only does sRGB, Linear RGB, XYZ, and Gray, and it hasn't been touched since Java 1.2. There's Color.kt which is actually decent (OkLab, CAM16, ZCAM, gamut mapping), but it's Kotlin, so you're pulling in the whole Kotlin stdlib for a color library. Apache Commons Imaging has some basic Lab/HSV conversion but it's an image I/O library, not a color science one. Google's material-color-utilities only does HCT for Material Design theming. The closest thing to what I was looking for is EsotericSoftware/color, which is pure Java with ~30 spaces including CAM16 and OkLab, and it even has spectral calculations and color temperature stuff that mine doesn't. Solid project, but it wasn't distributed through any package manager at the time I looked, and architecturally I wanted something with a conversion tree and automatic path finding instead of flat static methods.

So I ended up building my own: Colorimetry-java

https://preview.redd.it/26uszo25rzih1.png?width=1000&format=png&auto=webp&s=f13707e7c620a21966a94bcd223b0b4224fffaae

It has 54 color spaces, covering everything from the common ones up to OkLab, OkLCh, JzAzBz, CAM16, CAM02, HCT, ICtCp, ACES variants, and multiple RGB working spaces like Display P3, Adobe RGB, and ProPhoto RGB with their linear variants.

Every space also exposes extremely useful metadata: channel names, min/max ranges, default values, step sizes, whether each channel is bounded or unbounded, and gamut information. So if you're building a UI or a tool on top of the library, you don't have to hardcode any of that yourself.

The part I'm most happy with is how conversions work. Every space declares a parent and implements toParent()/fromParent(), forming a tree rooted at XYZ. The converter uses a Lowest Common Ancestor algorithm to find the shortest path between any two spaces, so if two spaces share a close ancestor it won't round-trip all the way back to XYZ. Similar idea to what colour-science does in Python with a NetworkX graph, but as a tree with LCA instead.

It also has 16+ grayscale methods, a validation system for out-of-gamut values, distance metrics, interpolation, and a gamut mapper.

If you need a color space that isn't built in, you can implement your own and register it through the ColorSpaceRegistry without touching the library's source. The converter will pick it up and route through it automatically just like any built-in space.

The project also has a pretty extensive test suite covering roundtrip accuracy across all spaces, so if anyone wants to contribute a new space or fix something, there's already infrastructure in place to catch regressions.

Pure Java, targets Java 11+, MIT license, available on JitPack.

I know Java isn't really this sub's thing, but if anyone here does any kind of image processing or tooling in Java, maybe this saves you from the same frustration I had. Happy to answer anything about the implementation or the color science side of it.

u/PsychicPokemonRights — 8 days ago
▲ 1 r/JavaProgramming+1 crossposts

Planning a real life meetup for Java Developers near Mumbai

Hi guys, hope you are doing well.

I was planning to arrange a meetup near Mumbai for a java community. We can meet, talk about work related stuff in general over a coffee. I have created a whatsapp group.

Would love to hear your thoughts on this. And if you are interested you can dm to get added in the group.

The idea is to bring together people who are actively working in Java/backend engineering and have interesting real-world problems to discuss — production issues, architecture, performance, engineering practices, etc.

reddit.com
u/enigmatickcharisma — 8 days ago

Looking for a Java Backend Developer Referral – Happy to Give My 1st Month Salary as a Referral Bonus

Hi everyone,

I'm a Java Backend Developer with 3+ years of experience building scalable backend applications using Java and Spring Boot. I'm currently looking for Java Backend Developer / Software Engineer opportunities.

Tech Stack

  • Java 8/17
  • Spring Boot
  • Spring Data JPA
  • Hibernate
  • REST APIs
  • Microservices
  • MySQL & PostgreSQL
  • AWS (S3, EC2, RDS, IAM)
  • Git, Maven, Swagger
  • Docker (Basics)

Experience

  • 3+ years of professional Java backend development experience.
  • Worked on enterprise Banking and AWS Monitoring applications.
  • Built REST APIs, integrated third-party services, optimized SQL queries, and resolved production issues.
  • Strong understanding of OOP, Collections, Multithreading, Java 8 Features, and SQL.

📍 Location: Ahmedabad, India
📍 Open to Relocate: Ahmedabad, Bengaluru, Pune, Mumbai, or Remote
🚀 Notice Period: 0 Days / Immediate Joiner

LinkedIn:
https://linkedin.com/in/imharshshah

Resume:
https://drive.google.com/file/d/1bsXA7WkeQ7fbIrkDJdptrsrs_F1Q6IhZ/view?usp=sharing

If your company is hiring or you know of any suitable openings, I'd sincerely appreciate a referral or any leads.

As a token of appreciation, if your referral results in my successful joining, I'd be happy to share my first month's salary (or an agreed referral bonus) with you.

Thank you for your time, and feel free to DM me if you'd like to know more about my experience.

reddit.com
u/rockstar280707 — 9 days ago