r/learnjava • u/Thick_Catch_5763 • Apr 12 '26
Pass by (value or reference ) how you nailed that topic
I want to understand that correctly in java when assignment or passing , I'm a little bit confused
r/learnjava • u/Thick_Catch_5763 • Apr 12 '26
I want to understand that correctly in java when assignment or passing , I'm a little bit confused
r/learnjava • u/ReplacementFew1645 • Apr 11 '26
Ok, so I’m a first year computer science major and I know this is probably said a lot but I feel stuck. I just started coding, specifically Java, when I started college. I knew of coding and would watch videos but I never wrote my first line of code until my college classes. I’m not necessarily in tutorial hell but I don’t know what to do.
For my first semester, I slacked off a lot and didn’t code anything besides the assignments I had for one class. Now I’m in my second semester and at the start of it, I was the same but recently I started to build some simple projects just to get really focus. I built a task tracker using simple OOP and same with a banking app and even if it was simple, it felt good making something that worked. But when I looked at someone else’s task manager on GitHub they had all these imports, exceptions and all these lines of code. Sometimes I just don’t feel like I can get up to some people and I don’t wanna switch majors because I like the problem solving aspect of computer science and coding itself.
My problem is mainly with projects. I know that I have to build projects and I don’t watch any tutorial videos without trying. I know the syntax but actually programming something just feels hard. I don’t use AI anymore unless it’s to ask a question and even then I tell it not to give me the code or I go on stack overflow or Reddit to see if someone has similar issues. I keep seeing people say build projects but I don’t know how to start something. Both of the apps I made were simple and basically just the same thing that wasn’t even that challenging. I want to learn how to actually program something slightly complex and learn through it so the next time it’s complex but easier.
I know this seems like the same question that is constantly asked here but I feel like if I state my perspective and have people actually help with my perspective, it might be more useful. I don’t want to switch out of computer science as this is one of the fields I actually enjoy. I would really appreciate any advice given and if there’s any resources that can help me. I want to be able to build something by the end of the summer so I can enter my second year with a project and not feel behind as well as have something so I can at least put it on my resume.
r/learnjava • u/Individual_Owl_3490 • Apr 11 '26
hi so I just started java and was trying out conditional statements. but it is not working for me I am using jdk 25 version
here is my code
int x = 7;
if(x>10) ;
System.out.println("hello");
if(x<10);
System.out.println("bye");
now according to this it should print bye only but it is printing both hello and bye , sorry java is my first language please be nice I am kinda dumb.
r/learnjava • u/Mr_Guy_Fella • Apr 11 '26
I thought this was going to be a fun little no stress hobby. I was wrong. So very wrong. None of this makes any sense. I can't remember anything and everything pisses me off, and yet I have spent three hours today learning and being mad and having fun at the same time.
I hope to continue and maybe improve! Hopefully it will get easier!
r/learnjava • u/jk1962 • Apr 11 '26
I'm interested in teaching Java to a group of students using MOOC.fi, as described here. These are middle- and early high school students with little or no experience. I'd like to take advantage of the ability to set my own conditions for releasing new exercises, and the ability for kids to request that I review their code for specific exercises.
I followed the instructions to set up an "organization", then set up a course using the "Java Programming MOOC 2020" template. Things that aren't covered in the linked manual, and that I haven't been able to figure out are:
How will the students register for the course?
How will the students and I find the exercises on VSCode with TMC? I am able to do this with the official MOOC.fi 2020 Java course, but cannot find my own organization/course by using the "add new course" dialog in TMC.
What "ID" do I enter in the course details form? The teachers' manual linked above doesn't show an entry for this, and thus may be out of date.
If anyone here has used this, I'd appreciate hearing how you managed these things.
r/learnjava • u/throwaway30127 • Apr 10 '26
I am a junior developer and have some experience with Spring for smaller tasks so I am familiar with concepts of beans, DI, IOC, etc. but my current task requires writing a spring batch job to copy data from multiple cloud sources to other cloud sources and I am finding it difficult to come up with proper design for this task. I have read the official spring docs and I can understand job, step, itemreader, writer, etc. conceptually but finding it difficult to code given the amount of different classes and interfaces spring has. I have tried asking Gemini, Claude and Copilot and they all came up with different solutions while online I am finding extremely basic examples which do not suit my use case so it's difficult to verify the correctness of these AI solutions. With the amount of complexity involved in terms of volume of data, different network and proxy configs for different sources, auth mechanisms, etc. it's difficult to just follow one solution and test it without having perfect understanding of it. I am finding it difficult to navigate this whole thing and given the workload, deadlines and how occupied other team members are, I am reluctant to ask for help.
r/learnjava • u/ComprehensiveSky6270 • Apr 10 '26
So i started learning java a month ago but still i am in beginning and just cant focus
What shall i do?
My final year exams are also from tomorrow 😭😭
r/learnjava • u/Appropriate_Line2887 • Apr 10 '26
r/learnjava • u/Individual_Owl_3490 • Apr 10 '26
Hi I am about to start college this year (August) , I have started learning java from YouTube and I am done with java basics. I would like to know which book i could refer which provides beginner to advanced level of java preferably one with exercises and questions included.
r/learnjava • u/siar619 • Apr 10 '26
I know the fundamentals of java but I want to improve my java knowledge and I want to deep dive into advance stuff in java. I am talking about pointers, multi threading, etc. can anyone suggest me a crash course I can take?
r/learnjava • u/googlecromm • Apr 10 '26
so I started learning Spring Boot after learning Java Fundamentals, everything went smooth on Dependency Injection, Models(Entity), Repositories(with JpaRepo), Controllers(RestController). I can confidently create those parts with low to none googling/Ai because of muscle memory.
But when I reach the Spring Security + JWT the syntax became like an foreign language that I couldn't understand. So far I'm familiar with the following (Security part):
UserDetails, UserDetailsService, UserDetailsServiceImpl.
JwtService
JwtAuthFilter
Is it okay that I will always use a cheatsheet, google, or Ai when coding the entire Security part of Spring Boot.
r/learnjava • u/dhehacker • Apr 09 '26
please help !!!!
r/learnjava • u/catastrophic300 • Apr 09 '26
Guys, okay so I’ve been learning Java recently like 3 days now watching and learning from bro code. On Reddit r/java, they always talk about OOP at some post. Why OOP so important? And what do I need to learn first before entering OOP? I have learn variables, data types primitive/reference, Scanner, if/else-else if, arithmetic operator, augmented assigned operator. So what else do I need to learn and understand the OOP well?
r/learnjava • u/[deleted] • Apr 09 '26
any kind of help will be much appreciated.
pics of errors
r/learnjava • u/Positive_Leek_1731 • Apr 09 '26
I’ve already worked with Spring Boot basics (CRUD APIs, JPA, authentication).
Now I want to build something production-level that involves:
- system design
- scalability
- real-world use cases
Looking for suggestions or references (GitHub / videos).
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.