r/learnjava 13h ago

threads, concurrency & coroutines queston (beginner)

Upvotes

I am a man whom used kotlin before java, (maybe shoking)

i switched to java for springboot

i knew (a little) about coroutines from kotlin, == multiple things can be done and threads dont block

is the same concept true for java? or does java have some legacy stuff in place of kotlin coroutines?

i see that java has. a thread sleep. method. i dont think kotlin has

long story short, id like to reaffirm my knowledge on concurrency and general and how it

works, and find gaps, ill briefly explain how i think it works, id love for feedback, but you dont need to you can just respond to post that resonate more with you, thank you if anyone does respond

here it is:

concurrency means IO functions can happen without blocking things that come after them

all those functions happen on a thread, and multiple functions can happen on a thread

if it blocks the thread( i think functions other than IO can block aswell) then you can use concurrency that returns a result immediately, -> waits for REAL response -> then jumps back on a thread, -> causing no blocking

now what is thread sleep? and why would i want a thread to sleep?


r/learnjava 17h ago

Best way to learn Java and where to start

Upvotes

I wanna learn Java so I can make programs and make plugins for mc but I wanna know the best and most intresting way to learn


r/learnjava 16h ago

OCA Certification

Upvotes

How do you prepare for the OCA test?

Do you recommend any guide or book?

I already know most Java fundamentals, but now I'm looking for certification, and found out about OCA Certification exam. Any help is appreaciated.


r/learnjava 23h ago

5 years of software experience + 1-year career gap — How should I prepare for a Java backend role in the next 6 months?

Upvotes

Hi everyone,
I have around 5 years of software development experience, mainly in Java backend development, but I currently have a 1-year career gap. My goal is to get back into a tech company within the next 6 months.
I’m planning to seriously prepare during these 6 months and want to focus on the things that will actually help me become job-ready.
Apart from DSA and System Design, I’d like some guidance on:
What kind of Spring Boot projects should I build?
Should I focus on microservices or other backend technologies/concepts should I prioritize for interviews?


r/learnjava 15h ago

5 years of software experience + 1-year career gap — How should I prepare for a Java backend role in the next 6 months?

Upvotes

Hi everyone,
I have around 5 years of software development experience, mainly in Java backend development, but I currently have a 1-year career gap. My goal is to get back into a tech company within the next 6 months.
I’m planning to seriously prepare during these 6 months and want to focus on the things that will actually help me become job-ready.
Apart from DSA and System Design, I’d like some guidance on:
What kind of Spring Boot projects should I build?
Should I focus on microservices or other backend technologies/concepts should I prioritize for interviews?


r/learnjava 1d ago

I'm a full-stack react developer and want to learn java. What udemy/coursera (or other) courses would you suggest to start learning the fundamentals ?

Upvotes

Hello, I'm a current full-stack react dev and wanna learn and slowly transition to java/springboot. What courses can u suggest ?

I've always found this kinda courses good for fundamentals. After I learn the basics, I'd rather continue with project-based self-learning.

Thank you.


r/learnjava 1d ago

[MOOC course] TMC Beans submission buttons greyed out

Upvotes

I'm trying to get started learning Java and wanted to use the MOOC course since it seemed to be pretty unanimously the best one according to many sources.

I believe I've downloaded everything properly. I can open TMCBeans and look at the project files. But the buttons to actually run the programs and submit them are completely grayed out, meaning I can't continue with the rest of instructions or the course.

Is this something other people have experienced before? Are there any known fixes?


r/learnjava 1d ago

Development guidance

Upvotes

Hey seniors, if anyone is doing development with Java + Spring Boot, please guide me.

I’m currently in my 3rd semester and doing DSA in C++( done upto stack) , so I’m thinking of starting development alongside it. Please guide me on where I should start, what I should learn first, and how much time I should spend learning Java basics.

Since I’ve studied C++, I have a basic programming background, but I’m not familiar with Java. Any roadmap or resources would be really helpful. 🙌


r/learnjava 1d ago

Should I use this to learn java?

Upvotes

r/learnjava 2d ago

Striver A2Z free??

Upvotes

I am a beginner 1st year IT student with a basic knowledge of java. I tried using the well known striver a2z sheet from TakeUforward but it wouldn't let me submit my code without buying subscription. How am I supposed to learn to optimise my code without knowing where it stands in comparison to other submissions?

Is it possible to do it for free somehow or any other free sheet that provides structured progress? I tried using leetcode too but I couldn't understand which questions to solve and which not to from the mind boggling 3000+ questions. If someone has guidance on selecting questions on leetcode in a proper structure that would be appreciated too!

Thank you in advance!


r/learnjava 2d ago

bro code video any good?

Upvotes

i wanna learn java but is bro codes video the 12 hour long one any good? i will do my own projects inbetween


r/learnjava 3d ago

Is java a first good programing language to learn? i have never did programing so i dont know. Any suggestions?

Upvotes

welp i need tips and advice


r/learnjava 3d ago

Should I bother handling InputMismatchException in my temporary Java console UI if I’ll eventually replace it with a Spring Boot web UI using structured API input?

Upvotes

Hello everyone. I finished my Java course in my second semester. The course was called “Backend,” but honestly, my professor mostly taught us Java and JavaFX, nothing else.

I’m trying to learn backend development on my own now because eventually I want to get a job as a backend developer.

I decided to build my first project from scratch so I could practice OOP and get more comfortable with Java fundamentals. I chose a Texas Hold’em poker game, although I kind of regret it because it turned out to be a pretty big project for a first project after learning the fundamentals. Still, I’m making progress and I’m currently at the showdown part of the game.

Right now, it’s completely console-based, but my plan is to learn Spring Boot and databases and eventually turn this into a fully functioning website.

The thing is, I haven’t really built anything from scratch before, so I’m not sure if I’m approaching this the right way.

My approach was to first build the console version and separate the poker engine/game logic from the console UI, so that later I can replace the console with Spring Boot and a web frontend without having to rewrite the actual game logic.

But I’ve run into a question with the console version. For example, right now I’m adding error handling for things like InputMismatchException when someone types letters instead of a number. Then I started thinking: if I’m eventually turning this into a website, the frontend will send structured actions to the Spring Boot backend anyway, so most of this console-specific input handling will become irrelevant.

Should I still bother implementing comprehensive error handling for the console version, or should I keep the console UI minimal and focus my effort on the actual poker engine and business logic that will carry over to Spring Boot?

What would you recommend as the approach? I’d especially appreciate answers from people who actually build software professionally rather than the classic “I’m going to make fun of people on Reddit” self-proclaimed engineer.

Plus, I am building this project, but sometimes it is hard to understand what happens when you use constructor or class relationships. Like I can write the code but I sometimes cannot understand the relationship between classes 100%. Is this normal for the first project?

Thanks.


r/learnjava 4d ago

How do you check null safety when publishing a Java library?

Upvotes

I’m gearing up to publish my first Java library in the next few weeks. I’m using jspecify for null checking, with `NullMarked` annotations on my packages. Using my library requires implementing a subclass of an abstract class and overriding a method whose return value is marked as `NonNull`.

When I implement a subclass from my test suite, if I don’t have NullMarked enabled or if I don’t attach a `NonNull` annotation to the overridden method then I get a warning: `Not annotated method overrides method annotated with NullMarked`. So far so good; this seems like the tool doing its job by catching a potential source of errors.

Here’s my problem though: what if a consumer of my library doesn’t want to use jspecify? Am I dooming them to eternal build warnings? Is there a better way for me to have null checking in my library’s internal implementation and to publish it with useful `NonNull` annotations without locking consumers into a particular null checking dependency?


r/learnjava 4d ago

About Resilience:I failed my java 3 times ,but end up with a B

Upvotes

Life is full of setbacks. The only thing that matters is you keep pushing through them. It’s totally okay to feel frustrated along the way — but trust yourself, you can absolutely do it!


r/learnjava 3d ago

If you would ever own one java book what would it be?

Upvotes

Apparently, in our country there will be the biggest book fair. I’m hoping to get some discounts and planning to buy a book on java to supplement my learning on hyperskill. What book would you guys recommend? Would you say the book that you recommend allows you to become an employable java developer? Which book for entry, mid, senior level developers? Recently, i thought of learning from reading a physical book, for some reason, i find it hard to focus on learning online materials. I would appreciate any insights you guys have. Thank you! :)


r/learnjava 4d ago

Guidance for full stack Java course

Upvotes

So I know the basics and OOP concepts of java and I want to learn about spring, spring boot and microservices all the stuff which will make me industry ready. I have read a lot of reviews and it making me more confuse which to follow so what will be the best course for me also I do DSA with Java.


r/learnjava 4d ago

My path learning Java was terrible. i dont know if i will be able to re learn it

Upvotes

so last year. i decided i wanted to make apps. and decided to learn Java. i was 15 and stupid. so first thing i went through tutorial hell. i jumped from video to video. i also had no road plan. i just learn what was told on the videos. and i saw like ads about coding websites. and what matters with me is codedex. the first few levels were free. the rest were not. so i did the free ones then went to the projects and there i found out about swing. so yea. i was basically level one and was already learning swing. thats a dumb move. i kept my focus on swing and did some very simple apps. and then i realized that this was literally a waste of time. i knew basically nothing. but when i wanted to re learn it i felt myself skip skip skip because some things i knew. and lowkey giving up on Java.


r/learnjava 3d ago

What do you think Java course of Dheeru Mundluru for learning Java from scratch .

Upvotes

I saw recommended on reddit a few times , says it teaches extensively core java , advanced Java .


r/learnjava 4d ago

How do you structure cross-cutting concerns in a real Java modular monolith?

Upvotes

I'm trying to understand how people structure a reasonably large Java/Spring modular monolith in practice.

I understand the general idea of package-by-feature / DDD / bounded contexts fairly well. For example:

orders/
submissions/
users/
catalog/

And inside a business module you can have things like:

api/
application/
domain/
infrastructure/

What I'm struggling with is everything that doesn't fit neatly into a business domain.

For example:

  • security
  • authentication / authorization
  • CurrentUser / UserContext
  • email notifications
  • file storage / uploads
  • PDF generation
  • reporting Jackson
  • configuration Web MVC
  • configuration messaging
  • observability
  • global exception handling

Where do these things actually live in a real modular monolith?

For example, suppose I have:

submissions/
orders/
users/
notifications/
security/
config/
infrastructure/

A submission is created and I want to send a confirmation email.

Would you do something like:

submissions
|
| NotificationRequested
v
notifications
|
v
EmailSender

with notifications being an application module, and EmailSender / template rendering / SMTP being infrastructure?

Or would you put the email infrastructure outside the notifications module?

Similarly, where would you put CurrentUser? If every controller needs the authenticated user, should it be exposed by a security module? Does that mean all business modules depend on security?

And what about Spring Security annotations such as:

@PreAuthorize("hasRole('ADMIN')")

on controllers belonging to different modules?

I'm also wondering how this relates to Spring Modulith. I understand that it can enforce application module boundaries, but I'm not sure what the recommended approach is for these cross-cutting/technical concerns.

I'm specifically interested in real-world production codebases, not toy/tutorial examples.

How do you normally structure this in a large Java/Spring application?

If you have examples of mature open-source projects or architectural documentation that demonstrate this, I'd really appreciate them.


r/learnjava 4d ago

UofU transfer student needing help

Upvotes

Hey everyone,

I’m a second-year transfer student at the University of Utah, and I’m feeling pretty overwhelmed about CS 2420.

My previous programming experience is mainly Python, and I’m now trying to learn Java. I understand basic programming concepts, but I’m finding the transition to Java harder than I expected.

I’m especially struggling with the basics and knowing what I actually need to learn before getting into the CS 2420 material. I've already asked my professor for help but he just said use chatgpt and google.

I’m also pretty stressed because I’m a transfer student and feel like I’m behind everyone else. I have some programming experience, but Java is making me feel like I’m starting over.


r/learnjava 5d ago

Entry-level Java dev interview in ~1 week. what should I drill? (CS/Math background, mostly Python experience)

Upvotes

Hey all. I have a technical interview for an entry-level Java role coming up in about a week, and I want to use the time wisely.

Background: CS + Math degree, so I'm solid on data structures/algorithms and general logic, but almost all my hands-on coding has been in Python. I've been working through Java on Coursera and just finished the core OOP stuff (inheritance, polymorphism, abstract classes vs interfaces, exceptions, static/final). I'm comfortable with the syntax now but haven't done timed coding problems or "explain this concept out loud" style prep in Java specifically.

For people who've done entry-level Java interviews recently:

  1. What actually got asked? Was it mostly OOP theory questions, LeetCode-style DSA in Java, or a mix?
  2. Anything Java-specific that trips people coming from Python (I'm guessing things like static typing gotchas, collections framework quirks, == vs .equals())?
  3. What would you drill hardest in a single week if you only had a few hours a day? Conceptual Q&A, coding problems, or both?

Not expecting senior-level stuff, want to walk in solid on fundamentals and not freeze up writing Java under pressure. Any resources, question banks, or "wish I'd known" tips appreciated!


r/learnjava 5d ago

Best way to learn java?

Upvotes

So i wanna learn java as a hobby but what is the best way to learn it? Idk my goals yet maybe eventually mc mods but idk

And does is matter i dont know advanced math since i dropped school at 12 im 16 now and yes im working on jt


r/learnjava 6d ago

Guidance to start java full stack

Upvotes

I completed my graduation in 2025 it's already a year wasted by self learning. l simply cannot learn on my own i just keep jumping from AWS to data analysis and now i want to take a paid coaching from a good coaching centre. It's for like 6-8 months of duration in java full stack by the time i complete the course it will be almost 2 years after graduation so a bit scared but want learn and get a job.Any suggestions that can help me guide and don't wanna lose my path to get a job.


r/learnjava 8d ago

Help for java 21 ocp 1z0 830 exam

Upvotes

Im planning to give this certificate exams cause I want to gain deeper knowledge in java and having an exam to focus on gives me a goal to achieve, so im more of a visual leaner and want to start with a pathway of videos and courses and then do practice exams, this is my strategy so far.

Im not that eager to read books or articles and prefer videos and practicing along.

I see oracle has a learning pathway that's build for java 21 programming and it has a pathway that looks good. So im trying to see if anyone has tried the pathway and found it useful for the cracking the certificate examination or are there any udemy courses that I could take that helps with my certification.

This is the pathway https://learn.oracle.com/ols/learning-path/become-a-java-se-21-developer/117252/138845

Also let me know any useful site that have a lot of practice questions to try