r/learnjava • • Aug 31 '24

Free sites to learn to code java?

0 Upvotes

Hello, I am a newbie at the programming world and I am having a hard time looking for materials, free practice coding sites for me to learn. I hope you can give me some pointers so I'll know where to start


r/learnjava • • Jul 16 '26

Devs who work with legacy Java — what actually eats most of your time?

1 Upvotes

Hey all. I'm a CS student looking into the pain points around legacy Java codebases, specifically the "code archaeology" side: digging through old code with little to no documentation, figuring out what a piece of logic is even for before you dare touch it.

Just trying to understand the problem properly before building anything. Would really appreciate hearing from people who deal with this regularly:

  1. What eats the most time when you're digging into unfamiliar legacy code?

  2. How do you currently deal with it – any tools/tricks that actually help?

  3. Has something ever broken because a piece of code turned out to be "magic" nobody fully understood?

Any answer helps, even a couple of sentences. Thanks in advance!


r/learnjava • • Sep 20 '26

C# developer wants to give java a try

1 Upvotes

As the title says I used to make many apps, games using c# but I also want to try something different and challenge myself a bit.

The problem is, that all youtube tutorials on java are for complete beginners where they even explain what variables are.

There are some "advanced" tutorials tho, since the syntax of java is pretty similar to the syntax of c#, but those tutorials are often low quality, from 2014, or from sum indians - for an english learner an accent isn't the best...

What would you guys recommend?


r/learnjava • • Sep 21 '24

What does putting . do?

1 Upvotes

I realize this sounds dumb but ive been learning java and gotten pretty far but never learned what . does. e.g

String s = args[0]

char c = s.charAt(0)

what does the . in s.charAt(0) do?


r/learnjava • • Feb 11 '24

Java fullstack as a fresher on india

0 Upvotes

Should I learn java fullstack if i already know java or go for mern stack as a fresher.


r/learnjava • • Dec 18 '20

How do I run a java script

1 Upvotes
class Main{
    public static void main(String[] args){
        Console.log("Hello world");
    };
};

I have this saved as java file, however would like to have it run as a script. Not sure why it won't work, and how do I get it into browser?


r/learnjava • • Nov 23 '23

What does <...> mean and what is this code doing?

0 Upvotes
    btn.setOnAction(new EventHandler<ActionEvent>() {

        @Override
        public void handle(ActionEvent event) {
            System.out.println("Hello World!");
        }
    });

I'm trying to learn JavaFXa and I almost know nothing about Java. So btn is an instant of the class Button, an object. setOnAction is a method that's making it do something when btn is clicked, right? And the keyword new creates an object from the class EventHandler and passes it as an argument of the setOnAction method, but I have no idea what the rest of the code does. What does <ActionEven> do? Why are there brackets after the parenthesis? What does @Override do? It overrides the previous definition of a function and replaces it with the new definition?


r/learnjava • • Oct 08 '23

Lack of understanding in Java (JOptionPane) is causing severe depression, please help?

0 Upvotes

The title says it all. I am super depressed about not understanding the most basic of Java. You think I am joking but I've spent upwards of 12 hours on basic questions. I need to complete an introduction course to continue with my degree. I am using JOptionPane to create basic input dialog boxes but can't grasp the concept of writing a code and it providing me visual information.

I can't even begin to explain what I know as it is negligent. Any programs, discords, anything at all where people are willing to help.

This is what I need to learn:

 Adding the required import statements to the project

o import javax.swing.JOptionPane;

 Adding the required comments at the top of the code

 Declaring constants of different data types (int, double, boolean, String) and initializing them appropriately using the correct naming conventions discussed in class

 Declaring variables of different data types (int, double, boolean, String) and initializing them appropriately using the correct naming conventions discussed in class

 Getting user input using a JOptionPane.showInputDialog() function call

 Converting user input from String to int using the Integer.parseInt() function

 Converting user input from String to double using the Double.parseDouble() function

 Converting user input from String to boolean using the Boolean.parseBoolean() function

 Assigning values to variables using assignment statements

 Doing basic calculations using assignment statements, arithmetic operators (+, –, *, /, %), constants, variables, etc.

 Knowing how to check if a given number is perfectly divisible by another number using the appropriate arithmetic operator

 Using an if-else()decision structure, relational operators (>, >=, <, <=, ==, !=), logical operators (&&, ||, and !) simple expressions, and compound boolean expressions to make decisions

 Setting String literals (anything with double-quotes around it) to String variables using assignment statements

 Concatenating strings to add String literals to values in variables and storing the result in String variables

 Knowing how to use the String.format() function with the appropriate format specifier (“$%,.2f”, “%02d”, “%.2f”, “%.2f%%”etc.)

 Displaying output back to user using a JOptionPane.showMessageDialog() method call

TLDR: Depressed an hopeless but don't want to throw in the towel just yet. I need any resources at all to help learn JOptionPane.


r/learnjava • • Mar 26 '20

Free Udemy JavaFX Course

1 Upvotes

With so many people asked to stay home many people will be looking to put their time to good use. For those who want to improve their coding skills, the Udemy course "Introduction to JavaFX development" is now available free for the next 31 days, until 24th April 2020. There are 10 free spaces available. Sign up now for lifetime access to the course and build on your Java programming knowledge.

All gone


r/learnjava • • Aug 09 '26

best way to learn java?

1 Upvotes

so i wanna learn progamming 16 dropped out of school at 12 long story so idk if that is a problem for java

but i wanna learn programming and i chose java and then if i get far enough which will take a while i know maybe make mc mods just as a hobby mainly

but what is the best way to learn java? i came across bro code 12 hour long video


r/learnjava • • Sep 21 '26

Help me with this java community

0 Upvotes

Hi everyone!

I came to this community like.. 10 minutes ago

I started to learn java about 5 months ago, and now I understand that I need to talk with another java-coders, and now I here

Please, can someone describe me that is happening here? I also want to show my code to criticism.

P.S - sorry about my english ):


r/learnjava • • Dec 29 '23

I don’t like Java. Change my mind.

0 Upvotes

Hi all! I don’t mean for this to be a shitpost or anything like that, truly. Lately, for some reason, posts from this sub have been entering my email. I’m primarily a C# dev, and I love Typescript as well. I’ve always hated Java. Don’t ask me why…I don’t know. When I was in school, I was more or less taught that Java is super slow because the JVM is bad.

I’d love to know what’s been up with Java, partly because a lot of banks seem to use it and partly because I don’t wanna be that guy that just discounts a whole language because of flaws it had over a decade ago.

So change my mind! I’d love to find out what’s been up with Java, and any resources y’all can provide for learning Java (bear in mind I’m a very experienced software engineer) that aren’t LinkedIn Learning (I get access through my local library but that access is down right now) would be super appreciated.

Again, this is not a shitpost. I just hate Java. Change my mind!


r/learnjava • • Jun 16 '25

SUGGEST A BEST JAVA COURSE IN UDEMY

12 Upvotes

Hi Guyss!!! please suggest me a best udemy course to learn java


r/learnjava • • Jan 23 '24

NEW TO CODING

2 Upvotes

Im brand new to coding and i want to get into it. I am a senior in highschool and i want to know what are the best places to learn java?


r/learnjava • • Jan 18 '22

Why do you guys put the curly braces at the end of the line instead of the beginning of the next line?

0 Upvotes

It always looked weird to me, and I just don't understand why so many people put the curly braces there.

I know this isn't a java thing since people do it in JS and C too(the audacity), but why?


r/learnjava • • Nov 25 '22

What does it mean when it returns an "Index out of bounds" message for array?

2 Upvotes

And how to solve this?


r/learnjava • • Apr 23 '25

I'm overwhelmed trying to find a clear path to learn Java

0 Upvotes

Thinking of building a tool using AI to create personalized roadmaps. It doesn't recommend outdated generic course that might be too basic. It learns about your current goals and understandings, so that you don't have to go through an ocean of resources

Would something like this be useful to you?


r/learnjava • • Nov 13 '25

Java vs JavaScript: Which One Should Learn?

0 Upvotes

I’m trying to decide whether I should learn Java or JavaScript first.


r/learnjava • • May 16 '22

what does bufferedreader in java stands for?

0 Upvotes

Help me out


r/learnjava • • Sep 05 '20

Sorry but what the f*** does mooc.fi wants me to do in this exercise?

4 Upvotes

A list is extremely useful for storing the values of variables for later use. That said, making mistakes is also relatively easy with a list.

There is a program that uses a list in the exercise template. Modify it so that its execution always produces the error IndexOutOfBounds
. The user should not have to give any inputs to the program (e.g. write something on the keyboard)

You can also see a means for going through the values of a list — we will return to this topic a bit later.

import java.util.ArrayList;
public class IoobProgram {
public static void main(String[] args) {
// Modify this program to cause an indexOutOfBoundsException
ArrayList<String> lines = new ArrayList<>();
lines.add("Never has a man influenced physics so profoundly as Niels Bohr in the early 1900's");
lines.add("Going back to this time period, little was known about atomic structure; Bohr set out");
lines.add("to end the obscurity of physics. However, things didn't come easy for Bohr. He had to");
lines.add("give up most of his life for physics and research of many hypothesis. But, this is why");
lines.add("you and I have even heard of the quantum theory and atomic structures. Bohr came");
lines.add("up with his quantum theory while studying...");
for (String line: lines) {
System.out.println(line);

}

}
}


r/learnjava • • Sep 23 '26

Advice for Building a Java Desktop App (srry4badenglish)

0 Upvotes

Hi guys, im kinda new to java and im looking foward to improve, with this vision in mind i decided to build a desktop app with some friends (they dont know shi either) that works as a library for PDF/docx documents, i think that building it would be a great way to learn and deepen my current knowledge, however, after reading some documents and watching a few videos i still feel completely lost. I am sure that if i get some indications ill get to figure out the rest. PLEASE HELP GNG ✌️😭


r/learnjava • • Aug 08 '26

Backend Engineer (2 YOE) transitioning to AI Engineer – How should I position myself, and how do I learn the production side?

0 Upvotes

Hi everyone,

I'm a backend engineer with 2 years of experience in Java/Spring Boot. Over the last several months, I've been spending most of my free time learning Generative AI, building AI agents, RAG applications, and exploring some ML concepts through personal projects. I genuinely enjoy working in this space, and it's the direction I want to take my career.

One challenge I'm facing is positioning my profile.

When I apply as a backend engineer transitioning into AI, I receive very few interview calls because I don't have professional AI experience. However, when I do get interviews, I'm comfortable discussing prompt engineering, RAG, agent workflows, embeddings, vector databases, and the projects I've built.

Where I struggle is when interviewers ask about production AI systems—deployment, Kubernetes, cloud architecture, CI/CD, monitoring, model serving, LLMOps/MLOps, observability, scaling, etc. Since my experience comes from personal projects rather than production environments, I don't have much exposure there.

So I'd love to hear from people who've made a similar transition:

\- How did you position your profile while moving from backend to AI?

\- Should I market myself primarily as a backend engineer with strong AI projects, or is there a better approach?

\- What's the best way to learn the production side of AI engineering in about 2 months?

\- Are there any courses, open-source projects, or hands-on roadmaps that helped you become interview-ready for production AI roles?

A bit of context: I'm trying to make this transition because I genuinely enjoy building AI applications, and I'm also under some financial pressure to switch to a better opportunity soon. I'm happy to put in the work—I just want to make sure I'm learning the right things.

I'd really appreciate any advice from people who have successfully transitioned into AI engineering. Thanks!


r/learnjava • • Feb 22 '24

What is the ideal way to hit a REST endpoint using Java that uses an API token?

0 Upvotes

When trying to code using Chat GPT I see plenty of tutorials on how to setup and use tokens to make prompts with JSON response in other languages that are not Java.

Does Java have an ideal way to hit such REST endpoints (or any end-points) rather than using URL and URL Connection class?


r/learnjava • • Sep 16 '22

Java Question

0 Upvotes

I am unable to make my printIndex method work.

import java.util.Scanner;

class Main {

public static void main(String[] args) {

String name;

int birthMonth;

int birthDay;

int timeAtm;

Scanner sc = new Scanner(System.in);

System.out.println("Please enter name:");

name = sc.nextLine();

System.out.println("Please enter birth month(enter in number form):");

birthMonth = sc.nextInt();

System.out.println("Please enter birth day:");

birthDay = sc.nextInt();

System.out.println("Please enter time(military)");

timeAtm = sc.nextInt();

}

public static int lengthofname (String name) {

int nameLength = name.length();

return nameLength;

}

public static int index (int name, int birthMonth, int birthDay, int timeAtm) {

int indexTotal = (timeAtm/name)+(birthMonth*birthDay);

return indexTotal;

}

public static void printIndex(int indexTotal){

if(indexTotal>500){

System.out.println("You will have a good day");

}

else {

System.out.println("You will not have a good day");

}

}

}

What can I do to fix it?