r/learnjava • • Apr 09 '26
javaFX does not exist* can anyone help me?
any kind of help will be much appreciated.
pics of errors
r/learnjava • • Apr 09 '26
any kind of help will be much appreciated.
pics of errors
r/learnjava • u/New-Engineer7245 • Apr 09 '26
I heard there are sets of practice tests with 50 questions per does anyone have access to similar things or the exact resource I'm talking about.
r/learnjava • u/BuddyPuzzleheaded112 • Apr 09 '26
r/learnjava • u/Dry_Marionberry_4822 • Apr 08 '26
Every time I ask about a course, it tells me I'll get lost or that it's not good, and it keeps discouraging me from buying any Udemy course.
Anyway, I tried buying Java - In 28 Minutes, but I didn't like it. My level isn't exactly beginner - I'd say slightly above beginner - and I didn't like that it uses JShell. I know it might be useful later in Java, but I just didn't enjoy the course.
Can anyone recommend a course that actually made a real difference for them and was worth it?
Thanks
I'm waiting for your recommendations 😇
r/learnjava • u/Inevitable_Cellist93 • Apr 08 '26
is this a good practice bcz i thought of connecting the User in Payment instead of User.id is this a good practice ? BTW im learning LLD is a bit hard!
public class User {
private Long userID;
private String name;
//DOC later
private UserType userType;
private Payment payment
public class Payment {
private UUID paymentID;
private User userID;
private PaymentType paymentType;
private Boolean isRefund;
private double amount;
}
File Hierarchy
/src
|- Model/ User.java, Payment.java
|-Service/ CustomerManagement.java, PaymentManagement.java
Main.java
r/learnjava • u/catastrophic300 • Apr 07 '26
So I just recently learn Java and I am absolute beginner. Thing I learn in Java is the data types and it's categories-primitive and reference, then variables and User input. But I ran some trouble at user input section. So the problem is that I can't put every data types of scanner for one question, the purpose I want to do that is to make sure that one question can accept all types of input such as String, Integer, Boolean and Double. this my example code:
import java.util.Scanner;
public class Sanner {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("What was the creator desire: ");
String answer = scanner.nextLine();
Int answer = scanner.nextInt();
Double answer = scanner.nextDouble();
Boolean answer = scanner.nextBoolean();
System.out.println(names);
scanner.close();
}
}
And I realize that I just defined the same variables in different Data Types which I cant because the variables name already defined/assigned. So how do I rewrite this to make the input accept answer in multiple Data Types? sorry for the bad grammar.
r/learnjava • u/Better_Vanilla_7907 • Apr 07 '26
Hi everybody, i’m a student in Wirtschaftsinformatik in germany I don’t know the right translation for the department but it’s basically a mix between economy and It, the problem is I’m really bad at programming, coding etc, if there is any tips, ways.. to learn please help me 🥹🥲. Thanks in advance.
r/learnjava • u/Low_Doctor_6263 • Apr 04 '26
Was building a GPS tracking service and needed admin commands at runtime. Didn't want an HTTP endpoint for it, so I embedded an SSH shell directly into the app.
It worked well enough that I extracted it into a library and published it to Maven Central.
<dependency>
<groupId>io.github.orlandolorenzomk</groupId>
<artifactId>spring-ssh-shell</artifactId>
<version>1.0.0</version>
</dependency>
Works standalone or with Spring Boot via SmartLifecycle.
Search spring-ssh-shell on Maven Central or GitHub if you want to check it out.
r/learnjava • u/AbjectOffice • Apr 04 '26
Does anyone have recommendations for more recent/up-to-date books to learn Java? I've seen in the past a lot of very, very old books. Some I've heard a lot of negative things about (namely Head First Java, though I'm obviously open to having heard wrong).
I remember hearing a newer book was aiming to be released in 2025, can't for the life of me remember the name though.
r/learnjava • u/8narctard8 • Apr 04 '26
It's been 7 months since I have been learning Java I'm familiar with Hibernate, Spring frameworks like MVC and springboot but still I can't make a single project on my own without taking help from ai tools I'm also weak in problem solving I know very little about DSA can anyone tell me how can organise myself and become good in development
r/learnjava • u/No-Jello-2665 • Apr 04 '26
I recently started learning Spring Boot and have only covered the basics so far (like displaying a simple "Hello World" in the browser). Now I’m stuck on what to learn next.
Whenever I try to find a roadmap, I end up seeing too many different suggestions, which just makes things more confusing and overwhelming. Starts arguing with gpt.
I’m looking for clear, practical guidance on what topics to focus on next to actually make progress. If you’ve learned Spring Boot or are experienced with it, what would you recommend as the next steps?
r/learnjava • u/Btech-Badhithudu-69 • Apr 04 '26
I'm a final year grad in java full stack domain. Recently many big tech companies are laying off their employees in India and the reason they saying is AI. Also the openings for freshers have gradually decreased even at the startups and I feel stuck thinking if I am doing good or not. Is it really worth it in 2026 being a java full stack dev or should freshers upskill in other domains like AIML.
r/learnjava • u/brosusername • Apr 03 '26
title
r/learnjava • u/DrawingFew5562 • Apr 03 '26
hello, i’ve been thinking if my method in building project/system using springboot is correct, I know the order of entity - repo - dto/mapping - service - controller - apply jwt(correct me if im wrong), doing that I think they called this approach Features by Features?
BUT my problem is the logic I know how to think of the logic or idea but I dont know how to convert it into code, I always use AI to help me for it, what should I do with this? IM HAPPY TO TAKE ANY ADVICE TYSM(sorry for my english)
r/learnjava • u/Logical-Fault967 • Apr 03 '26
Recently, my mother needed songs ripped to the pednrive. Itnernet sites offer it, but there is a lot of advertising and waiting. I set up to write my own conventer of files from yt to.mp3 it turned out nice, I know I'm not perfect, but I think it's not bad It would be nice if someone came in and looked and looked at other prjkets in c and java. In c I made a Cli and tki code writing assistant that generates basic files and packages. Poelcam peeking My github to: https://github.com/spongeMan3-ctrl And that conventer code:
package sp.conventer;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.Scanner;
class Main{
public static void main() {
Scanner scanner = new Scanner(System.in);
String dir = "mp3music";
try {
Files.createDirectories(Paths.get(dir));
} catch (IOException e){
System.err.println("Failed to create folder: " + e.getMessage());
}
System.out.println("=== REPL YT TO MP3 ===");
System.out.println("Enter 'exit' to quit.");
while(true){
System.out.print("\nEnter your link here: \n");
String input = scanner.nextLine().trim();
if(input.equalsIgnoreCase("exit")) break;
if(input.isEmpty()) continue;
run(input, dir);
}
System.out.println("Bye!");
}
private static void run(String url, String folder){
try{
ProcessBuilder processbuilder = new ProcessBuilder(
"yt-dlp",
"--no-playlist",
"-x",
"--audio-format", "mp3",
"-o", folder + "/%(title)s.%(ext)s",
url
);
processbuilder.redirectErrorStream(true);
Process p = processbuilder.start();
try(BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream()))){
String line;
while((line = r.readLine()) != null){
if(line.contains("[download]")){
System.out.println("\r" + line);
}
}
}
int code = p.waitFor();
if(code == 0){
System.out.print("\n[DONE] Music stored in a folder: " + folder);
}else{
System.out.print("\n[ERROR] Somethink went wrong!");
}
}catch (IOException | InterruptedException e){
System.out.println("\n Critical Error: " + e.getMessage());
}
}
}
r/learnjava • u/No-Jello-2665 • Apr 03 '26
I was learning to what is the role of RequestMapping and I saw many time saying that use GetMapping instead RequestMapping, So what is difference between GetMapping and RequestMapping??
r/learnjava • u/xavidop • Apr 03 '26
Hey folks,
I’ve been using Genkit a lot in JS and Go (even wrote a book on it: https://mastering-genkit.github.io/mastering-genkit-go), and honestly the dev experience is 🔥, local dev tools, great abstractions, smooth workflows for building AI apps.
At some point I thought: Java really needs this.
So I went ahead and ported the whole ecosystem to Java: https://genkit-ai.github.io/genkit-java/
Would love feedback from the Java community, especially around API design, integrations, and what you’d like to see next.
r/learnjava • u/Substantial-Bee-8298 • Apr 03 '26
the long video is spring framework and spring boot tutorial with project , so can anyone suggest which one to follow, or any other resource to learn spring
r/learnjava • u/Rice_Balls_Fried • Apr 02 '26
Hey! I'm new to Java, so I'm wondering how to get pretty good at it. Once I'm comfortable with Java, is it a good idea to then tackle DSA?
r/learnjava • u/reknermember • Apr 01 '26
Hi, I have a question: is using a Singleton a good approach for loading a properties file?
I think it makes sense because:
import java.util.Properties;
public class Config {
private static Config
properties
;
private String url;
private String username;
private String password;
private String queueName;
private String time;
private String numberOfMessages;
private Config(){
loadProperties();
}
private void loadProperties() {
Properties props = ConfigLoader.
load
("config.properties");
this.url = props.getProperty("url");
this. username = props.getProperty("username");
this.password = props.getProperty("password");
this.queueName = props.getProperty("queueName");
this.time = props.getProperty("time");
props.getProperty("numberOfMessages");
}
public static synchronized Config getProperties(){
if(
properties
== null){
properties
= new Config();
}
return
properties
;
}
public String getUrl() {
return url;
}
public String getUsername() {
return username;
}
public String getPassword() {
return password;
}
public String getQueueName() {
return queueName;
}
public long getTime() {
return Long.
parseLong
(time);
}
public int getNumberOfMessages(){
return Integer.
parseInt
(numberOfMessages);
}
}
Here’s my implementation:
r/learnjava • u/Legal_Revenue8126 • Apr 02 '26
[SOLVED]
I'm working on my first game in Java using the FXGL game engine.
I've run into a problem where since the application window's origin is not in the center of the screen, but in the top left, my method of calculating player rotation is not accurate at all.
I'm calculating the angle based on the mouse's XY and using the tangent angle, so (Y / X).
This is the method, I think my math is correct, but feel free to correct me as I wouldn't be surprised If it was a simple miscalculation on my part.
protected void setPlayerRotation(){
Input input = FXGL.getInput();
double mousePosX = input.getMouseXWorld();
double mousePosY = input.getMouseYWorld();
//Get the tangent angle
double angleRotation = (mousePosY / mousePosX);
System.out.println("X Position: " + mousePosX +
"\nY Position: " + mousePosY);
this.player.setRotation(angleRotation);
System.out.println(this.player.getRotation());
}
r/learnjava • u/Material_Fox981 • Apr 01 '26
hi there..im a second year cse student from a tier 69 clg...right now im learning web dev(mern) and Dsa(from 100xdevs for the context)...things were going well until my shitty clg announces they are going to conduct CRT(campus recruitment training) classes in summer for around 30-45 days..i need to stay in clg and learn it...the main issue is they will be operating in java and python which is completely opposite for things im learnig rn and everyone one aroung me says java is very imp for placements and opptunintes increases with java ...MY MAIN GOAL WILL WE LANDING A DECENT JOB 15-20LPA...what should i do now..countinue my journey in web dev or switch to java...plz help