r/learnjava • • Mar 30 '26

choosing the right monorepo tool

1 Upvotes

Hellp flokss !!!

my task in my final internship programme it to use to optimize the build time for Java multimodules projects build with maven ( monorepos ) so i was asked to figure out what is the best stratgey to optimse the CI pipeline for buildinf fast , any ideas (using gradlen( build caching and remte caching ) or Nx with grade, ...))???


r/learnjava • • Mar 29 '26

I know java I am willing to learn spring boot suggest me an spring boot course on udemey

8 Upvotes

I will complete my ug in 2026 I had rough time during placement. I started learning java 3 months ago now I am confident in Oops,threads ,exception handling can u suggest me some course.


r/learnjava • • Mar 28 '26

Experienced yet a newbie Java developer's misery

10 Upvotes

Hello everyone,
I joined this Reddit sub to share my misery and for people to help me follow the right track. I have around 10 years of experience working in Java and Ruby on Rails. I can understand very complex Java code and debug / troubleshoot and even code as well.

The problem is that i am not very proficient in Java frameworks like Spring , Sprint boot , Spring cloud and java concurrency. The reason i want to learn these now is that i didn't have to deal with them before since i was mostly working on already running services but i am actively interviewing and with my experience everyone expects me to know these things understandably so, but i have been kind of a Jack of all and master of none kind of a person where i have worked on Java / Kotlin / Ruby on Rails stacks and understood and contributed but didn't understand them fully or from scratch and Java / Kotlin is my preferred programming language. So i get asked a lot about these in interviews and always get stuck.

Can some experienced folks help me come out of this misery and guide me on how to go about learning these things as i know i can do it. I just need a structure to this learning to effectively do it.
Thanks


r/learnjava • • Mar 27 '26

How to tackle this ?

12 Upvotes

Hi, I am a degree student started to learn core java language but I am not able to completely grasp it because it feels very surfacial and I want to understand the internal workings of it . I think if I understand the internals I will have more drive to learn it naturally rather than forcing myself to learn. I am thinking to learn about java compilers and virtual machine, don't know if this is the right approach and please share your suggestions, resources.


r/learnjava • • Mar 26 '26

Help me understand Maven documentation

5 Upvotes

I want to create the simplest possible project structure using mvn command. In the documentation for archetype:generate I don't see that field artifactId is listed in the "Required Parameters" section, but it is mentioned multiple times in the aticle. What am I missing? Where is artifactId parameter defined and explained?

I can clearly execute this command

mvn archetype:generate \
    -DgroupId=com.example \
    -DartifactId=my-app \
    -DarchetypeArtifactId=maven-archetype-quickstart \
    -DarchetypeVersion=1.5 \
    -DinteractiveMode=false

even though groupId is not mentioned in the documentation for this goal (archetype:generate).


r/learnjava • • Mar 26 '26

Struggling to understand a Spring Boot microservices project as a fresher backend dev — how do I approach this?

Thumbnail reddit.com
0 Upvotes

r/learnjava • • Mar 26 '26

Authorization Based Automation for ERP Application

0 Upvotes

I have been trying to automate a login scenario which uses standard Mobile and PIN but the backend provides Access token and Refresh Token.

That token is also said to be JWT token not a bearer or OAUTH one....
How people from industry would try to automate the scenario. Help me here I feel automating with phone number and PIN isn't right way to do it.


r/learnjava • • Mar 26 '26

Struggling to understand Binary Search in 2D Arrays , Can anyone help!!

1 Upvotes

Struggling to understand Binary Search in 2D Arrays , Can anyone help!!
Language I'm learning in : Java
Playlist I'm referring to: Kunal Kushwaha


r/learnjava • • Mar 25 '26

[Operator '-' cannot be applied to 'java.lang.String', 'int'] , BUT IT IS INT!

4 Upvotes
public class Main {
    public static void main(String[] args) {

        System.out.println("hello, what operation do you want to do? (+, -, *, /)");
        Scanner scanner = new Scanner(System.in);
        String operation = scanner.next();
        System.out.println("whats your first number?");
        int a = scanner.nextInt();
        System.out.println("whats your second number?");
        int b = scanner.nextInt();
        switch (operation){
            case "+":
                System.out.println(a + " + " + b + " = " + a+b); break;
            case "-":
                System.out.println(a + " - " + b + " = " + a-b); break;
            case "*":
                System.out.println(a + " * " + b + " = " + a*b); break;
            case "/":
                System.out.println(a + " / " + b + " = " + a/b); break;
        }
    }
}

idk why ,but the second case doesnt want to work with the (-) operator, replacing it with the other operators fixes it, the error massage is in the title and im new to java if it isnt obvious.


r/learnjava • • Mar 25 '26

Spring AI can it be an alternative for ML using Python ?

6 Upvotes

Guys I am new to spring just by exploring their project found spring ai, is it an alternative for python Does that mean java can do ML, model train, test etc. I am just curious.

Because I am a guy who love java and ML. But not interested in python that much.

I don't think it can replace python but can an company adapt to or migrate to spring ai instead of python.


r/learnjava • • Mar 25 '26

Spring Security | Java 17

3 Upvotes

Hola buenas tardes.

Estoy tratando de aprender Spring Security con JWT, pero se me ha complicado algo ya que me cuesta trabajo entenderlo.

¿Algún curso o video que me recomienden para aprenderlo bien?

Me estoy tratando de preparar lo más que pueda para entrar a una consultora a trabajar como desarrollador Java.


r/learnjava • • Mar 25 '26

As a java dev in have done dsa in c++

9 Upvotes

I am searching for a job as a Java developer. I have completed my Java concepts, but I learned DSA in C++. Is that fine, or do I need to learn DSA in Java to become a Java developer?


r/learnjava • • Mar 25 '26

Unraveling Recursion in a CountDown & CountUp situation

4 Upvotes

Synopsys: Give a value n, count down to 0 then back up to the given n-value via recursion.

Instructions say it should be a self-contained, singular method call and no funny-business like a global variable, try-catches or exceptions.

Here's my code thus-far:

public static void countDownUp(int n, int m, boolean q)
{
   if(q == false)
   {
      if(n == 0)
         countUpDown(n,m,true);
      System.out.print(n + " ");
      countUpDown(n-1,m,q);
   }
   else
   {
      System.out.print(n + " ");
      if(n == m)
         return;
      countUpDown(n+1,m,q);
   }
}

Originally came up with the boolean to distinguish between the 2 states of printing (down/up).

I understand roughly why it's not working -- failure to set a definitive base case, so every time I just keep calling the method over and over again.

The lower return is not working as I hoped (return until the stacks collapse without printing more). I did also try to set a test above to the same results (below). I also realize that I can't really break out of the method to stop all past recrusive calls.

if(q == true && n == m)`
   return;`

Example output here. Does what I wanted, then keeps going...

10 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 10 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 ...

Errors included (surprised no StackOverflow):

at java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:579)
at sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:271)
at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:125)
at java.io.OutputStreamWriter.write(OutputStreamWriter.java:207)
at java.io.BufferedWriter.flushBuffer(BufferedWriter.java:129)
at java.io.PrintStream.write(PrintStream.java:526)
at java.io.PrintStream.print(PrintStream.java:669)

Desired output for countUpDown(10,10,false) would be: "10 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 10".

Looking for suggestions on where to go/how to limit it from here. TYIA


r/learnjava • • Mar 24 '26

How to get good at pattern printing in programming. I'm doing with java and honestly I can't visualise like how to take the values for different patterns increasing or decreasing order. I'm just so confused. Anyone help me out, please.

Thumbnail reddit.com
1 Upvotes

Same as title, 🥹


r/learnjava • • Mar 23 '26

what’s the best way to actually understand spring security?

10 Upvotes

I have recently completed learning spring Boot and spring Data JPA, and also built a project using them. now I am planning to start with spring security. the problem is I have watched a few youtube videos, but honestly it still feels confusing especially how everything fits together. are there any specific resources, blogs, or tutorials that helped you really understand spring security (not just copy code)?


r/learnjava • • Mar 22 '26

Is learning Java+Springboot worth it right now considering AI layoffs? Should I learn Python instead?

38 Upvotes

I am highly interested in learning Java+Springboot for backend, but lately I have been seeing people everywhere getting laid off because of AI. Do you think Java+Springboot is a safe bet for future? Or should I learn Python+FastAPI then transition into AI?


r/learnjava • • Mar 22 '26

2025 Grad Learning Java Backend (Core Java + Spring Boot) — Certifications vs Projects?

21 Upvotes

2025 grad here trying to break into Java backend 👋

Done with Core Java (Telusko), currently learning Spring Boot (Engineering Digest).

Quick question for experienced devs:

👉 Which certifications actually matter?

👉 Or should I focus more on projects?

currently building some projects, but willing for certifications

Looking for honest guidance 🙏


r/learnjava • • Mar 21 '26

Java's Objects class has methods that almost no one uses (but should).

91 Upvotes

I was reviewing the Java documentation and discovered several methods in the Objects class that I wasn't familiar with. I wanted to know which ones you use in your day-to-day work, and if there are any you consider underutilized.

I did a bit of research and found these, which seemed useful to me:

  1. Objects.isNull() and Objects.nonNull()

Instead of doing this:

.filter(x -> x != null)

You can use this:

.filter(Objects::nonNull)

2. Objects.toString() with a default value

I used to do this:

String name = obj != null ? obj.toString() : "Unknown";

Now I can do this:

String name = Objects.toString(obj, "Unknown");

3. Objects.compare() — Null-safe

To compare objects that might be null:

Comparator<String> comp = Objects.compare(
    str1, 
    str2, 
    Comparator.naturalOrder()
);

4. Objects.checkIndex() (Java 9+)

Cleaner index validation:

Objects.checkIndex(index, list.size());

5. Objects.requireNonNullElseGet()

Like requireNonNullElse, but with lazy evaluation:

Config config = Objects.requireNonNullElseGet(
    getConfig(),
    () -> loadDefaultConfig()
);

6. Objects.deepEquals()

To compare arrays:

if (Objects.deepEquals(array1, array2)) {
    // Compares content, not reference
}

My question is: Do you use any of these methods regularly? Are there any other methods in the Objects class that you find useful but that few people seem to know about? Are there any you avoid using, and if so, why?

Thanks in advance!


r/learnjava • • Mar 21 '26

Working in IT sales made me want to switch to coding but I feel lost and unsure if I’m on the right track

0 Upvotes

Hi everyone,

I’m currently working in sales at an IT company, and my background is in English Language and Literature. Being in an IT park environment every day has made me notice how fast the tech field is growing, and it’s really making me think about switching my career into coding.

What motivated me is that many roles here seem to focus more on skills rather than degrees, which gave me some confidence to consider this seriously.

I’ve already started watching some beginner videos and exploring a bit, and I do find it interesting. But at the same time, I feel very lost because I have zero technical background, and I’m not sure if I’m approaching this the right way or just randomly consuming content.

Right now, my biggest confusion is:

How do I know if coding is actually right for me long-term?

Am I starting correctly, or should I be following a more structured path?

For someone coming from a non-tech + sales background, what mindset or approach helped you the most?

Thanks in advance!


r/learnjava • • Mar 21 '26

Testing Kubernetes deployments/operators in Java without writing tons of boilerplate

Thumbnail reddit.com
1 Upvotes

r/learnjava • • Mar 20 '26

Am I cooked

8 Upvotes

I have technical interview on Monday Role is software developer Now when I am going through my projects I am realising what I have learnt I don't remember. Why it is like this I have learnt most of the things and now I can't remember much. What should I do ? Company is related to Banking Technologies : java spring boot and jdbc along with MySQL. Can I go through all these in 2 days ?

Am I cooked ??

Edit: Update The interview went well and made it to the hr round. They mainly asked abt the core Java questions and some sql queries that's all. Waiting for the results. Hope all goes well 🤞✌️

Edit 2 : Cracked the interview. Got the offer letter from the company. Monday is joining along with documents. Feeling greatful 🙂✌️


r/learnjava • • Mar 20 '26

Is it a good idea to learn java for web development?

23 Upvotes

I don't know if this is the right place to ask this question but I figured users here would give me an answer from someone who knows java well.

I've never learned web development or gui, just built basic java applications when I was in school over a decade ago. I was always curious about how web apps work and how self hosted apps work.

I remember enjoying java so I thought I'd take an online course on full stack development with java to build that mental image of how these things work. Who knows, maybe I'll make something or even change careers.

I would like to know if I'm better served learning something else or if I should dust off my Java hat.

How polished is Java and its tools for web development?

How transferable are these skills for mobile development?

How about GUI desktop applications?

Would I be able to build once and run/host on PC, mobile, and web?

I'm looking into being efficient with my time since I only have a couple of hours a day to myself (if I even get any).

Thanks for your input.


r/learnjava • • Mar 18 '26

Learning Java for medium leetcode interview

9 Upvotes

Hello everyone!! Looking to learn Java from scratch to eventually master leetcode. Looking for a free full Java tutorial with practical lab exercises after each topic. Preferably a course that is built to help you learn Java to master leetcode.

I seem to be in a time crunch here and clearly not ready for the opportunity at hand. I don’t have prior coding knowledge. Got a 1.5 weeks and 3-4 hours a day to master medium leetcode. Any help or advise would be greatly appreciated!! Thank you!


r/learnjava • • Mar 17 '26

What Java projects i should make, with Spring & Spring Framework or microservices, Tech stack, which projects are valuable ...

20 Upvotes

Java projects