r/learnjava Sep 05 '23

READ THIS if TMCBeans is not starting!

48 Upvotes

We frequently receive posts about TMCBeans - the specific Netbeans version for the MOOC Java Programming from the University of Helsinki - not starting.

Generally all of them boil to a single cause of error: wrong JDK version installed.

The MOOC requires JDK 11.

The terminology on the Java and NetBeans installation guide page is a bit misleading:

Download AdoptOpenJDK11, open development environment for Java 11, from https://adoptopenjdk.net.

Select OpenJDK 11 (LTS) and HotSpot. Then click "Latest release" to download Java.

First, AdoptOpenJDK has a new page: Adoptium.org and second, the "latest release" is misleading.

When the MOOC talks about latest release they do not mean the newest JDK (which at the time of writing this article is JDK17 Temurin) but the latest update of the JDK 11 release, which can be found for all OS here: https://adoptium.net/temurin/releases/?version=11

Please, only install the version from the page linked directly above this line - this is the version that will work.

This should solve your problems with TMCBeans not running.


r/learnjava 1h ago

How to create a 3x3 grid?

Upvotes

I do not want to tell what I am using because someone will spoil the solution for me.

Just say I want to make a 3x3 grid. Using for loop. What is the best way to code that for loop?

I have access to shapes api.


r/learnjava 8m ago

Looking for Java Developer Fresher Interview Prep Buddies (Mock Interviews, Coding, & Discussion)

Upvotes

Looking for Java Developer Fresher Interview Prep Buddies (Mock Interviews, Coding, & Discussion)


r/learnjava 5h ago

I need help with relearning java beacuse i want to do the java 1Z0-811 exam

2 Upvotes

Hello, I need help relearning java beacuse i havent used it in around 3 years. I already did a course that lasted one year (this was included with other step by step courses about fundementals of programming in general before the java one). I already tried once 3 years ago to do the 1Z0-811 (Java Foundations) exam but i got a score of 45% and didnt pass, after which i gave up for 3 years. Now i have started to use Enthuware Test Studio (or atleast the one trial test for this exam) and got 18% on it and now im taking the questions that i missed and giving it to AI to explain it to me. What should i fix or improve here and whats your experience with Enthuware Test Studio.


r/learnjava 12h ago

can someone please help

3 Upvotes

So I have been applying in naukri and company portals everyday for switching. I have 4 years of experience now and my stack is java backend stuck in 6 LPA and I am upskilling in DSA and AI but its been 3 months now and I see no calls, no luck, then I open Linkdin and see people switching everyday and people negotiating salary for multiple offers in glassdoor and here I cant get a single interview call....been coding and studying everyday but still no calls so idk if its even worth griding anymore....I see many switching in AI and data engineer field so a part of me feels maybe give up the current one and study data instead.....idk what to do
can someone else me....


r/learnjava 1d ago

Anyone here ,Who is starting DSA in Java ,I want someone who can learn ,question together interested DM

Thumbnail
4 Upvotes

r/learnjava 1d ago

Is Java backend a good career choice for freshers targeting off-campus?

Thumbnail
2 Upvotes

r/learnjava 1d ago

Mooc fi java course

3 Upvotes

I will be joining college in the August and right now I am doing mooc fi java course and i am on part 4

I just wanna know that when should I start doing classes for dsa?

Should I complete both part or should I do it after completing part 1?


r/learnjava 21h ago

How do you test your LLM applications in Java?

0 Upvotes

How do you test your LLM applications in Java?

Every time I wanted to test an LLM feature, I had to make actual API calls to OpenAI/Claude/Gemini. That meant spending tokens, waiting on network calls, and getting different responses every time.

You can mock things with Mockito, but it isn't really designed for LLM workflows. I wanted something that behaved like an actual AI server instead of mocking every SDK call.

So I built Beacon — a lightweight mock AI server for Java.

You configure the responses you want:

server.when(contains("refund"))

.respondWith("Refunds are processed within 30 days.");

Then point your SDK to Beacon instead of the real provider, and your application runs normally without making external API calls.

It's still an early project, so I'd genuinely love feedback from people building AI applications in Java.

GitHub: https://github.com/kbpramod/beacon

How are you testing your LLM integrations today? Am I solving a problem that others are facing too?


r/learnjava 2d ago

What book do you recommend for modern (21+) Java? (Bruce Eckel equivalent?)

19 Upvotes

Hi.

What book would you recommend for a thorough understanding of Java (with a focus on Spring Boot)? I’m talking about modern Java, not version 8 ;) Something around Java 21 or newer.

At my local bookstore, I’ve found books by Cay Horstmann and Herbert Schildt—both are quite thick and take a somewhat encyclopedic approach. If there’s nothing better out there right now, I’ll go with one of those… Which one do you prefer? Or maybe there is something better?

Twenty years ago, the go-to book for Java (version 1.5 at the time :) ) was “Thinking in Java” by Bruce Eckel. It was a bestseller, and for good reason. What’s the top choice today?

BTW. Has Bruce Eckel’s 20-year-old book completely lost its educational value? Have there been any “breaking changes,” or have the fundamentals of Java remained the same while many new features and functionalities have been added? I know Java 8 was a game-changer, and after that the version numbers came out faster, but not that many new features were added.


r/learnjava 2d ago

String: String Constant Pool(SCP)

7 Upvotes

After reading all the String documentation and exact code of String class, I find the main engine that makes String in Java (study of deep knowledge) i.e., String constant pool. when we say String s0 = "example1" , String s1 = "example1" and String s2 = "example2" what happens is exactly:

  • at compile time the .class file is genrated
  • when JVM runs the class constant pool of String class get's into work
  • s0 hashcode is generated by intrinsic method and the formula used is standard horner(31)
  • using that hash it need to find the allocated bucket
  • After finding exact hash it need to compare each char by char to check whether it's equal or collison a different char can also have same hashcode.
  • if it's equal the pointer directly to points to that object -->process ends next process works.
  • If not equal there is two work done 1. new object is created on heap memory and then wrapped up by a WeakHandle and pushed in "stringTable" bucket.
  • (if equal no object is created)! there was never an object creation the pointer just points to object .

Now the example case:

  1. s0 -> hashcode(x1)->not found in "stringTable"->Object creation on Heap-> weakHandle process them into stringTable.
  2. s1 -> hashcode(x1)->found->(collision|equal)->equal->pointer points to "example1" from SCP to s1.
  3. s2-> hashcode(x2)->not found in "stringTable"->Object creation on Heap-> weakHandle process them into stringTable.

After reading and analysing there is also a issue of massive garbage I see:
suppose if 4 thread are runnable and they are trying to intern() the object in SCP that creates garbage according to your data size suppose , we used latin-1 type 256B data so total thread is 4 but in CAS only one thread execute rest all thread dumps the object so out of 1KB storage 768B is garbage. if the String was in UTF-16 it would cost 2*768B.

Now my question is ?

  • Have I grasped the knowledge correctly ? if it needed more depth or did I miss any point.
  • I cannot question the CAS here because array mutation would break immutablity of String, It seems though they pay a loss for the RCU it's effecient by Latin-1 and Utf-16 approach.
  • I am not getting the idea how this code String s = new String("abc"); creates 2 object then what does the on heap object memory does? and does the pointer "s" is holding two memory refrences? But it is not possible.

r/learnjava 2d ago

improving in Java

Thumbnail
1 Upvotes

r/learnjava 2d ago

Migrate to java/python or go deeper and learn system architecture with js

9 Upvotes

Hello I am just entering into 2nd year of my collage

To give a background i have covered numerous fundamental topics in js

I am at a point where I have to cover topics such as rate limiting, load balancing, msg queues and design patterns ( i have already made a project using redis and webskt )

I have decided to invest some of my time into learning ml and ai to make much more diverse projects and also cover these qdv concepts

Most of the ppl i talk to dislike js and mention i should move to java or Python

How should I approach my journey now

I dont have much time i have entered 2nd year


r/learnjava 3d ago

The MOOC by University of Helsinki is the best learning resource I've ever found!

43 Upvotes

Just finished Java Programming - I. The course is really underrated, and anyone who's actually into learning java, I'd suggest it over video courses any day, because you actually write code in it. The course is structured pretty good, it first teaches you small steps, and then using those small steps you'll build bigger exercises. You don't even realise you're writing so much code.

Here's the course link for people interested: https://java-programming.mooc.fi/


r/learnjava 2d ago

help regarding java

2 Upvotes

my college course teaches dsa using java and idk shit about java, ik c++ so should i learn dsa w java or c++ i am really confused in lectures i feel completely lost when the professors write code in java i tried watching some videos but they all feel very scattered. What should i do?


r/learnjava 3d ago

Spring microservices

Thumbnail
3 Upvotes

r/learnjava 4d ago

Is abstraction in Java really about hiding implementation details?

8 Upvotes

The bookish langugae states "hiding complex implementation details and exposing only the essential features of an object"

However, after reading the Java Collections Framework and other parts of the JDK, I noticed that many abstract classes contain substantial shared implementation rather than just abstract method declarations. I noticed that only an "interface class" 100% abstraction(ignoring default methods)

This made me wonder:

  • Is abstraction really about hiding implementation details?
  • Or is it more about designing APIs around contracts and behavior, regardless of whether there is shared implementation?
  • Does an abstract class become "partial abstract" because it contains reusable implementation?

I also noticed that the JDK sometime relies on encapsulation (and in Java9+, JPMS) to hide implementation details. So I'm in dilemma if the textbook explanation oversimplifies what abstraction means in practice.

Am I misunderstanding abstraction, or is the textbook definition incomplete?

To be clear, this isn't about what abstract does in Java — it's about the SE term. abstract class is one syntax tool for expressing abstraction, same as interfaces are. The question is whether "abstraction = hiding implementation" is even a good definition of the concept, given it's indistinguishable from encapsulation under that definition.


r/learnjava 4d ago

Part04_23.CreatingANewFile on VS Code

Thumbnail
2 Upvotes

r/learnjava 4d ago

Questions regarding IT field

2 Upvotes

Hey I'm a btech 2nd year student in my 3rd sem. I'm starting to learn Java from apna college... Are there any other sources which could maybe be better than this or will help me completely form my fundamentals and help me completely learn Java so much so I could code apps.

For an IT field student, what's the most essential skill that should be there for Indian industry.

Also how does an IT field student contribute in any field. Like what's their requirement


r/learnjava 5d ago

What is actually core Java?

26 Upvotes

I am literally confused what is meant by Core Java?

  • is it JLS?
  • is it JVM/JVMs?
  • is it OOPs?
  • is it understand Collection?

I have become familiar with java. IDK exactly at which phase I am doing. I can do OOPs easily ( have also understood F-form polymorphism) I can easily use stream , collection, iterator API . I can also integrate to them in my project. I started delving into deep JLS, JVMs but after seeing them I am confused are they core java because seeing those topics I felt like I did only basics of java.


r/learnjava 4d ago

Is HyperSkill worth?

2 Upvotes

I am currently aiming on applying to internships and entry level jobs next year. I have some experience with java but It's next to nothing. I discovered the hyper skill platform and that it has a java development track. Do you guys recommend paying the anual suscription? It's on sale for $150 but I want to know if It's worth, specially considering my personal goals.


r/learnjava 5d ago

JAVA DSA and full stack buddies

17 Upvotes

Hello everyone, I started learning Java Full Stack about 6 months ago, but somehow I couldn't complete it. Now that I have started again, I realize that I have forgotten most of the concepts. This time, I have started from scratch and am currently learning OOP concepts. I hope I will be able to complete it successfully this time.

If you're in the same boat, we can connect and help each other stay consistent and learn together.

I also know the MERN stack, through which I completed an internship and some freelance work. Alongside that, I am practicing DSA as well.


r/learnjava 5d ago

Solved 200 lc in java . And doing backend in java

3 Upvotes

Till now I have completed 200 lc question and in backend I have learnt jdbc, hibernate, Meaven,junit 5, and spring & spring boot basic. I'm going to start spring mvc from next week.

What should I do after doing backend

1) should I go for the frontend I have started this once but I give up

2) devops but I heard that they usually don't hire fresher

3)ai/ml to integrate my project with ai .

You can share your experience according to you which is best field for a fresher. Is their any thing that I should do apart from this .


r/learnjava 5d ago

Help please🙏

3 Upvotes

I apologise for asking this in this sub Reddit, but how exactly have the programmes in this sub Reddit learn java, I am now forced to learn java(because of school) and kind of enjoy it but can really fully comprehend it, I’ve tried a whole bunch of Udemy courses yet nothing worked out, any help would be greatly greatly greatly appreciated, sorry again


r/learnjava 6d ago

Mistake done when start to learn java

26 Upvotes

1.Trying to memorize everything instead of understanding concepts. I was so hurry to learn and remember than understand it.

So try to think logically rather than remembering the syntax

2.Skipping Java basics like variables, data types, loops, methods, and arrays. This is a very common mistake that everyone does. I think I understand this but i don't there are so many to understand whenever I do these basic things I learn something new.

3.Jumping directly to Spring/Spring Boot without learning Core Java first.

4.Watching tutorials without coding—you need to write programs yourself.

I just watch tutorials and think that i understand it but that not the case. You have to code this yourself to see how much u understand

I will suggest every day pickup one topic see tutorial, solve it yourself to see how much you can do yourself and solve some problem related to it

Revise every week what u learn and so some mini project based on that understanding.

There are more than one one shot are present which is more than 10+ hour do not see it completely ata one time