r/learnjava • • Aug 22 '20

scan.nextInt vs Integer.valueOf(scan.nextLine())

49 Upvotes

I've been doing mooc.fi java course for a couple of weeks now and I noticed that every time they want an user to input a number, they use

int number = Integer.valueOf(scan.nextLine());

but I was curious what other parameters I can use with the scanner and I found out I can just type

int number = scan.nextInt();

which seems to be doing exactly the same thing. Is there any reason why would I want to use the longer one?


r/learnjava • • Jul 15 '20

Learn Java Basics Quickly

49 Upvotes

Hey all,

I need to know enough Java to be able to read short code passages for a module I'm starting in a few months.

I can code simple programs in python, and I pick things up really quickly. I'm currently committed to learning JavaScript and I don't think learning 2 languages at once is the best idea so I'll have about a month to learn. Probably about 40-50 hours of learning time max.

Does anyone know of any good resources that could help? Has anyone done this?

I signed up to JetBrains Academy when they did the "free till 2021" promotion.


r/learnjava • • May 12 '20

Any good Java practicing websites?

49 Upvotes

So, I've been learning from the MOOC thing for a little while, and I've made it to Java Programming II recently. But though I do like learning from Mooc, I want to practice java to better prepare me for a job. So I've seen a lot of websites lately where they give you certain tasks to program, and I'm just wondering if there are any sites in particular that are the best in giving me the practice I need along with the experience and understanding that comes with doing practice tasks. So far, I have seen coderbyte and a few others, but I'd like to know the best website for my cause :)


r/learnjava • • May 10 '20

any videos that show build a small project using java ?

49 Upvotes

basically i wanna see how you go through an idea or execute an idea , any like small series i can watch where i can find something similar ?


r/learnjava • • May 07 '20

Good Object Oriented Code

49 Upvotes

Hi

Can anyone share a link of a github repo where I can read good object oriented code. Not looking for java library code (as they are huge and difficult to dissect) but rather a smaller project/app with some domain. I tried searching but didn't find anything good. Found some basic projects.

Or can anyone suggest me a book or course where you learn it by doing. Trying to get better at OOD and implementation. I have read a lot of theory but want to look at real world examples.

TIA


r/learnjava • • Mar 21 '20

Just completed my first project and looking for criticism

49 Upvotes

Hey everybody I just finished my project and I’m looking for constructive criticism. Please roast it as I know there is probably a lot wrong and I want to learn. I’d like to say now that some stuff is honestly just unfinished. I’ve got to a point where I’m happy with it and may return to it but I honestly want to move to something else (mainly learn JavaScript/react to build a full stack REST api). So with all that out of the way please have at it!

Link to live site: http://skins-talk.herokuapp.com

Link to code: https://github.com/kyle-judd/redskins-forum


r/learnjava • • Nov 01 '25

Advance concepts in Java.

48 Upvotes

At the end of year 2024 I started reading Head First Java. That book was something which taught me programming. Then I read Algorithms by Robert Sedgwick intentionally because it is in java. Then I turned towards Spring.

But I am feeling that I don't know advanced concepts like JVM workings, reflections, generics, threads synchronisation, concurrency etc.

I prefer books. So is there any book that covers these topics and more at theoretical level ???


r/learnjava • • Aug 19 '25

Java Learning Progress – 1 Month

48 Upvotes

I have been learning Java for one month, studying about 4 to 5 hours per day. I first completed Bro Code’s Java programming playlist, which made Part 1 of the University of Helsinki’s Java Programming MOOC much easier to follow. Now I am working on Part 2, which is a whole new level for me. I also know that within the topics I’ve encountered, there are still many built-in methods and functions that I have yet to learn. My next plan is to study the Spring Boot framework, MySQL database, and Git/GitHub. Is this a good plan to follow?


r/learnjava • • Apr 08 '25

Best way to learn Java fast? (It's just not "clicking" for me)

48 Upvotes

..


r/learnjava • • Feb 26 '25

Best programming practice platform (HackerRank, LeetCode etc etc)

48 Upvotes

I see a lot of these types of InterviewPrep websites, and honestly I feel kind of overwhelmed by the amount of them. So my question to you is: What InterviewPrep website do you prefer, and why?

I'm sure there's plenty of people wondering this.

Thanks!


r/learnjava • • Jul 13 '24

Is it pointless to make desktop apps (i.e. using JavaFX, swing) for your career?

48 Upvotes

Throughout my whole life in Computer Science/SWE, I always thought real java apps were desktop apps, that have a frontend (JavaFX, Swing, AWT etc) and backend (Java, of course). Infact - all my personal projects have been made in this way - having a frontend and a backend but its a native desktop app. People have been saying that desktops apps are useless and no one cares about them.

I am also a recent graduate from a computer science bachelors course with a top mark/high grade and I feel terrible that I severely underestimated web apps, I never got all this hype about these React library/Angular frameworks. The fact that I don't even know them at all makes me feel like an imposter or a 'fake', we were never taught anything about this!!

Transitioning from desktop apps to web apps looks tough, haven't got a clue where I should start honestly.

My only experience is when we had Apache and hosted PHP scripts on it, going to the server's address in the URL of the browser and executing those .php scripts but I've forgotten all about that, but I could definitely get a refresh on it.

Maybe some people here can relate.


r/learnjava • • Feb 12 '24

Is anybody looking a mentor with Java?

48 Upvotes

Hi, guys, if anybody is looking a mentor with Java, OOP, Spring, Miscroservice Stack? I can help you. Now I am very interested in learning and practice English, this would be something like an exchange. So we can just chatting about java, doing voice calls and also I can provide a code review for tasks that I'll send to you.

In short about me (I can also send you my CV by email) :Java Backend Developer with 5 years of experience. Spring Boot stack experience - 4 years. For the last year I have been sharing my knowledge by recording video for a youtube channel and mentoring students on Yandex Practucum educational platform.

My stack:

  • Java 11/17

  • Java EE

  • Spring Framework

  • Kafka, Kafka Connect

  • Docker, Openshift, Helm Kubernetes

  • PostgreSQL, MySql, H2, Redis

  • RabbitMQ

  • Prometheus, Grafana, Kibana


r/learnjava • • Oct 10 '22

Finished MOOC.FI courses. What Next??

48 Upvotes

Thanks to this subreddit, i was able to finish and get certificates for both Java Programming courses. It really help me understand java. Now the question is what next?? What should be my next step. How can I get these kind legit course and certificates. Please help me out. I wanna learn about Spring Boot / REST Api / Spring Security. Any advice of what my next step should be . Thank you community.


r/learnjava • • Jul 19 '22

Why is Chad Darby's Spring very difficult?

48 Upvotes

Six months ago, I have absolutely zero knowledge in programming.

In this six months period I have learnt HTML, CSS, JS, React, and Finally Java. While I was learning these technologies I didn't feel there are gaps between what is being taught and what is already taught. After the courses I was successfully able to develop basic projects on my own.

Last week I have started Chad Darby's Spring course. The teaching is fine and all but the configuration is extremely difficult. For example, While creating a CRUD- MVC application, Chad has asked to import XML files where the data is all greek and latin. He has created connection using JDBC. Then in the jsp pages he wrote some taglibs and simply asked us to type it as it is.

What if I want to develop an App on my own? How do I know what to write in taglibs? How do I know what to write in xml files? How do I know what JAR files to download? How do I know what to write in JDBC Connection file?

Looking for suggestions from any captain who has crossed this phase!!


r/learnjava • • Jul 15 '22

What do I need to know to be considered a good Java developer?

48 Upvotes

I'm a software developer but I'm learning Java and Spring Boot on my own. I basically know how to build a Web Api and connect it to a SPA.

In plain Java I know about Collections, Streams, App flow (if loops etc). Classes, Inheritance, interfaces.

I learned Testing with JUnit

On Spring I know about routing, configs, Spring Security, Spring Data JPA, Validation, Spring Cloud

Idk what else should I learn and I'm feeling stuck...


r/learnjava • • Nov 19 '21

what is the best way of implementing a GUI nowadays?

48 Upvotes

im in a java class and for my final i wanted to be fancy and include a GUI. ive already been experimenting with Swing, but all the stack overflow articles i see are from the early 10's and a few that are mid 10's say to not use swing as its archiac.

i would like to learn the new offerings of doing a GUI's but from what i gathered, JavaFX is already depreciated? or at least not getting support or something? not sure if i understand that right. someone please point me in the right direction though?

i have been programming using JGrasp, im not the most interested in downloading other IDE's.


r/learnjava • • Oct 29 '21

Good Java books with practice projects.

48 Upvotes

Hello everyone, I’m a CS major and I am in an intro CS class that teaches in python. I won’t be able to take the next CS class until next fall semester because of course scheduling issues. It’s in Java and I don’t know any java so I would like to get ahead before I take the course. Any good beginner books for java would be appreciated. I currently have a pretty good under of python so do your thing Reddit.


r/learnjava • • Jun 20 '21

Here for giving my thanks.

48 Upvotes

I had a question, but not anymore. I checked the 'about' section and found MOOC and other free materials. Couldn't be any happier. I wanna thank the people putting up the links to the resources for free learning, I'll be forever thankful.


r/learnjava • • Jun 06 '21

How should I write a program to generate lottery numbers?

48 Upvotes

I want to write a program to generate lottery numbers. For brute forcing the odds and playing around like that.

I would like to give it a bit of versatility, being able to specify number of balls drawn, from what sized pool, How many supplementary numbers, and also if there is a bonus ball or two (Sometimes called power ball, has its own set of balls).

I know how to generate random numbers but there will be collisions (same number potentially drawn twice) which doesn't happen in lottery of course. I'm wondering if I should just generate another random number if a collision is detected, or I should use an Array of some kind.

Any suggestions?


r/learnjava • • Jun 01 '21

Can you suggest the best tutorial to gain a conceptual grasp of the Spring Framework?

48 Upvotes

I have watched a lot of tutorials but most of them are too technical for a beginner. If you know about any resources that provide a good understanding of Spring Framework, I’d be grateful. Thanks.


r/learnjava • • May 04 '21

Is Spring boot enough or should I learn the whole Spring framework?

48 Upvotes

Been learning about Spring boot for the last month, and just built a simple application where the most "advanced" thing was using Spring data JPA together with hibernate and postgresql. I enjoy it so far but there are still tons of stuff that "just works" but I don't really know why... Beans and dependency injections for example is something I know how it works but that I at the same time don't really understand.

I guess I would probably get a better understanding of spring apps as a whole if I took time to learn it from the ground up, and not just the Spring boot part. What do you think?


r/learnjava • • Sep 24 '20

Where and how to learn Java for beginners?

48 Upvotes

I want to start learning Java from tomorrow and I have a lot of questions. From which course or website should I learn Java? Where can I find the best documentation? How many days would it take to learn the basics of Java?


r/learnjava • • Aug 25 '20

What are some good resources to learn testing with JUnit and Mockito?

48 Upvotes

I would like to learn more about unit testing, theory and best practices with some practical examples on JUnit and Mockito. I've found some tutorials in the internet, but they don't usually dive too deep. Is there any books or online course I could use as a reference and to learn the basics but with some fundamentals?

Thank's!


r/learnjava • • Aug 14 '20

What's the difference between web application and enterprise application? What applications can I make in JavaEE that does not use web applications or websites?

48 Upvotes

Upon reading, I learned that web application executes in a web container such as Tomcat while enterprise is in the EJB server with extra functionality which also communicates to the web container.

However, I am still confused. I can create a website using JavaEE than jsp&servlets. Then why used JavaEE over web applications? Let's say, I will create an eCommerce site using JavaEE. The web container will be my view and all the logic behind it will be put in an EJB server. Even though, I can use JSP and servlet or put everything (view and logic) inside the web container I still choose JavaEE. Then what are the benefits if I used JavaEE than JSP?

What else can I make in the JavaEE that is not a website or desktop application communicating to an enterprise server?

I'm sorry. I just can't seem to understand. Please anyone give me a very clear explanation.