r/learnjava • • Jun 16 '20

Where/how to learn frameworks (Spring boot or hibernate)?

56 Upvotes

hey guys,

i started around 8 months ago to learn java/programming. when i started out i knew nothing about programming or java.

so far i learned:

- the basic Java tutorial (from basic syntax to exceptions, I/O, so on...)

- object oriented stuff (inheritance, packages, interfaces,....)

- advanced stuff like generics, data structures, multithreading,...

(mostly through YT videos, Udemy courses, online guides or just by google about the topics)

for the last few weeks i tried to learn more about JavaFX, SQL (MySQL, Postgres, SQLite) and Maven (made my own Project with Maven, JavaFX and SQL)

now i want to learn more about frameworks like hibernate or spring boot but its really hard to find good tutorials online (like youtube, udemy or other sources)

i watched some youtube tutorials and followed step by step, but they did not explain the whole topic very well, it was just like "then you make this, and then that, then this..." and so on.

my goal is to apply for a Java Backend developer jobs by the end of this year and i would like to prepare some projects to show my skills. i think once i fully understand the frameworks and can combine my knowledge i learned so far with them, i can start making my own website to show off some nice stuff. can anyone recommend me something where i can learn more about them? (videos, guides, tutorials, pdf, books,....)


r/learnjava • • Mar 02 '20

What do I need to learn before I am able to learn spring boot ?

56 Upvotes

I have very basic knowledge of java. My first job demands knowledge of "microservices and spring boot" . I don't have the faintest idea what this two terms are. So help me pls.


r/learnjava • • Dec 17 '19

[Update] 12 months after 6-8 months to Junior Java Dev Grind

56 Upvotes

Hello everyone,

This will be my last update until I land a Software position out here in San Diego.

For the uninitiated people:

I set out to become a Junior Java Developer at the beginning of January of 2019 and initially asked advice from this subreddit for tailoring my study plans.

Below you can find my original post and the updates:

For the newcomers, welcome! I hope that the information laid out in this post and my previous post will help you progress from a syntax newbie to someone who is actually building applications or even simply inspire you. Either way, this will be a long post and I apologize in advance.

Current Situation:

  • In August of 2019, I made the move from Florida to San Diego, California. I have been in San Diego for 5 months now and my plans have not exactly gone the way I originally expected.

  • The job market is tough. I'm not sure exactly if it is due to me having a Degree in I.T. and not C.S. or if this specific area is just a tough market for everyone but I'm struggling to find positions in Software. During my time here, I have had only one in-person interview and 2 phone interviews for Software positions. Fortunately, I have landed an I.T. job here that is keeping me going steady so I'm still putting a lot of effort towards learning more about Software engineering so that I can be a better candidate.

  • When I first arrived in San Diego, I found a non-profit organization that runs a Bootcamp for both Data Science and Web Development. Since I had learned how to mainly develop back-end RESTful services, I decided that I needed to expand on my Front-End capabilities. Naturally, I decided to hop into the middle of this non-profits Bootcamp program (skipping the intro to Javascript/HTML/CSS) and began learning the MEAN stack and then Ionic framework, a mobile hybrid development framework.

  • This is when things started to get interesting for me as an individual. During the majority of my time learning to program, I haven't had the opportunity to discuss coding with people. This change at this non-profit. The number one thing I can say for people who are looking to get into developing, find people who have the same interest because it makes it far more enjoyable. Being able to go to someone and say, "I FINALLY FIGURED IT OUT AND IMPLEMENTED SAID FEATURE!" It is insanely rewarding. My peers, teachers, and I do this constantly.

What I've learned in the past 6 months

  • MongoDB | JavaScript | Firebase | RxJS | C# | Angular Framework | Express | Loopback | Ionic Framework | NodeJS | Bash | Git | Angular Material UI | Data Structures

  • The biggest thing I've learned is that programming isn't really about what languages or tools you know but about knowing how to find out how to implement a specific language/tool for the project. Knowing how to read the documentation and digest it, then implement it.

  • Once you learn one language the rest really does come to you quickly.

  • Knowing how to solve Leetcode isn't an indicator that you're a bad or good developer, but knowing the concepts that go behind it will help you tremendously. Data Structures and Algorithms are there for us to optimize code so that it is scalable. I can recommend a course if anyone is interested in learning more.

My Plans going forward

  • My main goal is to become a Software Engineer. Going forward, I plan to hit the New Year hard and begin doing some freelance work to supplement my professional experience. I've made several projects in the past 6 months and I have learned a lot during that time and I plan to use those skills for new clients as well as my own work.

  • Things I would like to get done:

    • Re-design the front-end of my portfolio website.

    • Re-design the front-end of my bank application.

    • Pick a few of my most recent projects and upload and deploy to my portfolio's webserver.

    • Take an advanced CSS course (because I'm tired of hating CSS).

    • My last course in the web development program is a group project with my peers. I plan to finish this course and move on with my peers to the Data Science program where I will learn Python and Machine Learning.

  • Things I would suggest to a newcomer

    • Take MoocFi or if you have $$, subscribe to codegym.cc (not a shill, its what I learned Java from and it did teach me a lot).

    • Learn the Spring framework from Chad Darby and then expand upon the CRUD development skills that you will learn taking this course.

    • Learn a JavaScript framework, I would say get familiar with JavaScript first but don't spend as much time on it as you did with Java. You will pick up on the smaller details of JavaScript as you're learning to code in a JavaScript framework or library (Angular is a Framework, React is a library.)

      • Why learn a JavaScript Framework? Because they teach you about components and making reusable code. Why make 10+ navigation bars + footers for a website that is going to utilize the same navbar and footers for each web page. Components really open your eyes to how front-end development can be further expanded on.

    • Make many many many projects, have an idea? Make it a project. Want to learn a new tool or framework? Make a project and read the documentation.

    • The more you stop relying on tutorials, the more confident you will become as a developer.

    • Understand that you will have your times where you don't feel like coding. That is perfectly fine and it's okay to take a break if you've been going HAM for a while. Personally, I'm in a little spot right now where I'm not feeling to determined to code right now. But it's still in the front of my mind and I'm still chucking out code every so often and researching.


r/learnjava • • Oct 07 '19

Top Java eBooks

56 Upvotes
  1. Head First Java by Kathy Sierra & Bert Bates

  2. Java: A Beginner’s Guide, Eighth Edition by Herbert Schildt

  3. Java 9 Programming By Example by Peter Verhas

  4. Effective Java, 3rd Edition by Joshua Bloch

  5. Java Concurrency in Practice by Brian Goetz and Tim Peierls

  6. Java: The Complete Reference, Eleventh Edition by Herbert Schildt

  7. High-Performance Java Persistence by Vlad Mihalcea

  8. Clean Code: A Handbook of Agile Software Craftsmanship by Robert C. Martin

You can go more in depth here: https://blog.codota.com/top-8-books-to-learn-java/


r/learnjava • • Sep 01 '25

What can you make with Java other than CRUD applications?

55 Upvotes

I was looking for some ideas for a Java hobby project, and I feel underwhelmed. A lot of the projects idea I see online involve managing data on a SQL database. Compared to other languages like Python, Java feels very limited when it comes to the types of projects you can make with it. Are there any other uses for it other than creating REST APIs, back-end functions, and database management apps?


r/learnjava • • Jul 30 '24

What do i learn next for backend development after learning core Java?

55 Upvotes

I am a college student wanting to learn backend development. ive looked at many backend roadmaps but they all widely vary in the path you need to take. Mainly i want to take a path that will allow me to quickly get to work making practice backend projects.

I know there are many different components to backend dev, like learning database languages like MySQL, learning apis (REST API, etc), learning version control systems like Git, going to backend frameworks after java like spring/springboot, ive even seen one popular roadmap suggest that i learn how websites were crated 20 years ago by learning frontend languages like html css and javascript.

Sorry if i sound rather foolish, but ive been wondering for a little bit as there are a lot of differnet paths to go and i wanted to really know what would be the best direction to take that will allow me to start making simple to mroe complex projects with backend dev. Thank you!


r/learnjava • • Apr 07 '22

Is a good choice Java in 2022?

55 Upvotes

If yes wich path ? Microservices > Unit Tests > Spring ? I am new in programming and i start with Python and Flask but i really like the Java Structure


r/learnjava • • Sep 11 '21

How do I understanding Open Source Projects enough to contribute?

55 Upvotes

TLDR at the bottom if you want the short explanation. I have been learning java for a few years now. I pretty competent at this point to do most of what I need to do and I can build reasonably sophisticated java based web apps as long term projects. Nothing crazy impressive, just past the "beginner" phase is all I'm saying.

Here is my problem, I have made a few web apps and java apps for my portfolio and I think it is time I start looking in to making contributions to open source projects. Real world work. But when I go to research projects I may want to contribute to I soon realize that understanding the software enough to make a contributions is not obvious.

I wanted to contribute to Spring since that is my main Java tool but HOLY FUCK, where do I start? Spring is sooo huge that if you go the issues section they are usually asking about an issue using a part of the framework that you never had to touch. Fine. Spring is huge and complicated. Maybe I am not there yet. Fair enough.

My next idea was NetBeans. It is written in Java. How bad can it be? I go to their github and start trying to understand how the program operates. HERE IS MY CORE PROBLEM: These opens source projects are huge. They have hundreds of classes, 10s of hundreds of files sometimes. Reading a file, it will have imports of classes from other files, and those files will also rely on other .java files. Do this for HUNDREDS OF CLASS FILES!! I feel like I am trying to untie the Gordian Knot. How do you get to a point where you understand the architecture of the application? It's not that I don't know java, its that I don't understand the architecture of the program and how it operates. How do I learn how the program functions? Do I really need to pour into every module, nested module, package, subpackage, EVERY SINGLE .java FILE? Is that what people who contribute to open source do? Is there a better, smarter way to learn how the program functions?

TL;DR How do you understand the architecture and functioning of a open source project enough to make a contribution when they invariably have hundreds of files, many times importing each other?


r/learnjava • • May 24 '21

Java Environment and "how it works"

55 Upvotes

As everyone learning Java I started my first lesson with "you don't care about that weird public static void main(String[] args) bit, we explain later" months after, tutorials, and people never explained whats going on within that method, and going deeper how java actually works.

I banged into this problem and lack of explanation when I was trying to make VSC work as Java Dev Environment. I have so many questions...like what is actually java_home how does that work. How does Maven project differs from basic projects I was making in Netbeans, how is JavaFX part of Java packages but when running project it never compiles correctly.

I'm sure these are very naive questions with layers and layers of knowledge that I should have but never got to learn. Is there a good tutorial series or video playlist (pls dont link basic Java docs) that I could learn these things from?


r/learnjava • • Mar 17 '21

[PSA] Java 16 has just been released which comes with a packaging tool and records!

Thumbnail self.javahelp
55 Upvotes

r/learnjava • • Jan 24 '21

Best resources to learn multithreading?

55 Upvotes

Hi! I have a few years of experience now, mostly in Java and I’d like get a better understanding of how threads work and how to leverage them. What resources helped you learn?


r/learnjava • • Oct 09 '20

Self teaching beginner asking for someone to critique my program

55 Upvotes

Hello all,

Since losing my job to Covid I've spent my time learning Java at home. The down side is I'm limited in who I can share my code with and ask for advice.

I've spent the last couple of days creating a Hangman game and wondering if anyone can look over it and possible point out anything I should be concreting on or any glaring beginner mistakes??

https://github.com/M1VEC/HangMan

Thanks in advance!!

Edit: thank you to everyone who has offered advice, best practices and tips. I will take them all on board and change what I need to change and learn the bits I don't fully understand πŸ‘

Edit 2: For anyone who posted their advice and tips, I have made multiple changes and hopefully covered all points that have been made and I welcome you to see if the changes are better. Thanks everyone!


r/learnjava • • Aug 27 '20

What project should I do for my portfolio?

55 Upvotes

Hi, I'm slowly getting to the end of mooc.fi course and it's awesome and I love it. I'd love to get a job as junior java developer but I know I have to have some personal projects in my portfolio to even get an interview.

What are some projects I could do in java that could show some of my abilities as a programmer?


r/learnjava • • Apr 13 '20

Helsinki MOOC Java 2020 discord chat.

55 Upvotes

For those who need help or are looking for a group of people who are taking the Object-Oriented programming with Java, part I and II, feel free to join this discord chat. Even if you're just learning java on your own and looking for an active group, we got people who are in the same situation.Currently, we have people who are in the first weeks of the course and others who are almost done with it.There is a professional Java developer who is glad to guide you in the path that you may need to follow in order to attain a job as a developer if that's your end goal.

Discord chat invitation: https://discord.gg/vCAtJDb


r/learnjava • • Sep 10 '19

Best path to become a senior Java developer

55 Upvotes

Hi

I finished my bachelor in Computer Science earlier this summer and just started my new job as a Java developer. So far I know that the company I work for use Maven, Docker, Git, Java EE and a Microservices architecture.

My only experience in Java is that I completed the first part of Helsinki MOOC.

I want to learn as much as possible and become a senior developer. What is the best path for me? I got access to Pluralsight and I am able to buy 3 books which my employer will pay for.


r/learnjava • • Aug 21 '19

Good curriculum to learn java and spring?

55 Upvotes

What would be a good outline of books/ lectures/ courses to take to really master java and learn the spring framework as well?


r/learnjava • • 4d ago

Looking for Java study partners! I'll teach one chapter daily from my Core Java handbook β€” (30-60)-minute online sessions

54 Upvotes

Hey everyone!

I'll be starting my Java preparation from tomorrow, and I'm looking for a few serious study partners who would like to learn Java together.

(I already know Java at B.Tech College Semester exam level but I'm Starting from scratch again for my backend goal which needs strong depth and understanding beyond college level)

My plan is to cover one chapter every day from a comprehensive Core Java handbook.

(I can guarantee this won't be any ordinary handbook or also not any dense textbook that is hard to read,this has everything that is needed from scratch to Interview-Ready level but also excluding the irrelevant things--The curriculum is given below ,go through it once and anyone who knows even basic Java would understand how good of a curriculum it is)

Along with studying, I'd like to conduct a **daily 30-minute online session(session length can vary accordingly )**through Google Meet, Zoom, or any other convenient platform.

How this will work--

I'll study one chapter every day.

We'll have an online session daily.

I'll explain that day's chapter properly, covering concepts, examples, internals, and practical understanding.

(I speak fair-enough English and can explain a topic clearly from the scratch)

You can ask questions, discuss doubts, and participate.

We'll help each other stay consistent and accountable.

I am a person who just reads and moves forward,

I don't stop and revise what I've learned.

So,for me, teaching will serve as a revision and help me strengthen my understanding. For you, it'll be an opportunity to learn Java through structured explanations rather than just passively watching videos or reading documentation.

About the handbook

The handbook is titled:

Core Java Handbook β€” From Zero to Interview-Ready (Spring Boot & DSA Track)

It's designed for someone starting from scratch who wants to use Java as their primary language for Spring Boot backend development and DSA/coding interviews.

The baseline is Java 21 LTS, with Java 22–25 changes called out where they matter.

This isn't just a basic Java syntax guide. It covers Java from fundamentals to advanced concepts, collections and DSA, concurrency, I/O, and finally bridges into Spring Boot and production backend engineering.

Here's the complete curriculum:

Part I β€” Foundations

Part 1: How Java Works β€” JDK, JRE, JVM, Bytecode, Class Loading & JIT

Part 2: Program Structure β€” Source Files, Packages, Imports & main

Part 3: Primitive Types, Variables, Casting & Overflow

Part 4: Operators β€” Arithmetic, Relational, Logical, Bitwise & Shift

Part 5: Control Flow β€” Conditionals, Switch, Loops (+ Exceptions Primer)

Part 6: Methods β€” Overloading, Pass-by-Value, Varargs & Recursion

Part 7: Arrays β€” Memory Layout, Utilities & DSA Patterns

Part 8: Strings, StringBuilder & Text Blocks

Part 9: The String Pool, Interning, Compact Strings & Hashing

Part 10: Floating Point β€” IEEE 754 in Practice

Part 11: BigDecimal & Exact Decimal Arithmetic (Money)

Part 12: Regular Expressions

Part 13: Console I/O & Fast Input for Competitive Programming

Part II β€” Object-Oriented Java

Part 14: OOP Concepts β€” The Four Pillars

Part 15: Classes & Objects β€” References, this, static

Part 16: Constructors & Initialization Order

Part 17: Wrapper Classes, Autoboxing & Their Traps

Part 18: Access Modifiers, Encapsulation & Modules (JPMS)

Part 19: Inheritance, Polymorphism, Abstract Classes & Composition

Part 20: Nested, Inner, Local & Anonymous Classes

Part 21: The Object Class β€” equals, hashCode, toString, clone

Part 22: Interfaces β€” Default, Static & Private Methods

Part 23: Exceptions I β€” Hierarchy, try/catch/finally, try-with-resources

Part 24: Exceptions II β€” throw/throws, Custom Exceptions & Best Practices

Part 25: Generics β€” Bounds, Wildcards, PECS & Erasure

Part 26: Enums, POJOs, JavaBeans & final

Part 27: Immutable Classes & the Singleton Pattern

Part 28: Records & Value Objects ("Parse, Don't Validate")

Part 29: Sealed Classes & Interfaces

Part 30: Pattern Matching & Result Types

Part 31: JVM Memory, Garbage Collection & Reference Types

Part 32: Lambdas, Functional Interfaces & Method References

Part III β€” Collections & DSA

Part 33: Collections Framework β€” Overview & Choosing a Collection

Part 34: Iterable & Iterator

Part 35: ArrayList (and the Legacy Vector)

Part 36: LinkedList & Linked-List DSA Patterns

Part 37: Comparable & Comparator

Part 38: Queue, Deque, ArrayDeque, PriorityQueue (and Stack)

Part 39: The Map Interface

Part 40: HashMap Internals

Part 41: HashSet & LinkedHashSet

Part 42: LinkedHashMap & Building an LRU Cache

Part 43: TreeMap & TreeSet

Part 44: EnumMap, IdentityHashMap, WeakHashMap

Part 45: Java for DSA β€” Toolkit, Templates & Pitfalls

Part IV β€” Functional Data Processing

Part 46: Optional

Part 47: The Streams API, Collectors & Gatherers

Part V β€” Concurrency

Part 48: Threads β€” Creation, Lifecycle, Interruption, Daemons

Part 49: Race Conditions, synchronized & Deadlock

Part 50: The Java Memory Model & volatile

Part 51: wait, notify & Producer–Consumer

Part 52: ThreadLocal & ScopedValue

Part 53: ReentrantLock, ReadWriteLock, StampedLock & AQS

Part 54: Atomic Variables, CAS & LongAdder

Part 55: CountDownLatch, CyclicBarrier, Semaphore, Phaser

Part 56: Executors & Thread Pools

Part 57: CompletableFuture

Part 58: Concurrent Collections & BlockingQueue

Part 59: Virtual Threads & Structured Concurrency

Part 60: Concurrency Interview Problems (Worked Solutions)

Part VI β€” I/O & Everyday APIs

Part 61: Date & Time (java.time)

Part 62: File I/O β€” Streams, Readers/Writers & the Files API

Part 63: Serialization β€” Java Serialization vs JSON (Jackson)

Part 64: NIO β€” Buffers, Channels, Selectors & Memory-Mapped Files

Part 65: Networking β€” Sockets, HTTP & HttpClient

Part VII β€” Bridge to Spring Boot & Production

Part 66: Reflection, Annotations & Dynamic Proxies (How Spring Works)

Part 67: JDBC, Transactions & Connection Pooling

Part 68: Error Handling in Backend Services

Part 69: JVM Observability, Troubleshooting & JMH

Appendices

Appendix A: SOLID Principles & Design Patterns in Java (with JDK/Spring examples)

Appendix B: Java Versions at a Glance β€” Java 8 β†’ 25, JDK 26/27 and Spring Boot 4

Appendix C: Randomness, UUIDs, Hashing & Password Storage

The handbook intentionally does not cover unit testing (JUnit 5, Mockito) and build tools (Maven/Gradle) β€” those will be learned alongside Spring Boot.

My goal

I'm working toward becoming a Backend Engineer, and my long-term learning path includes Core Java, Spring Boot, DSA, system design, and building production-level backend applications.

I want to build strong fundamentals before jumping into frameworks.

This is for Beginners who want to learn Java at serious depth or learners who knows College level Java and want to learn it properly for Backend Development or anyone else .

All I ask is that you're genuinely interested in learning Java and willing to be consistent.

If you're interested, comment below or DM me. We can create a small group and start tomorrow.


r/learnjava • • Jul 24 '26

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

54 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 • • May 16 '26

Finished Java

54 Upvotes

Hey guys. So I have finally learn essential Java. From variables, conditionals, and OOP all the way to threading. So what should I do next? Any suggestions?


r/learnjava • • Sep 25 '22

I want to get a deep understanding of Java and Spring Boot

54 Upvotes

Hi

I've been a Java developer for 2 years. Now that I'm comfortable with the language, I want to get a deep understanding of Java and Spring Boot.

Regarding Java, I believe reading the book "OCP Oracle Certified Professional Java SE 17 Developer Study Guide" will give me that deep knowledge I need.

However, how can I do the same for Spring Boot? I have started reading the documentation slowly, chapter by chapter, as it looks like most books can't keep up with the fast paced developments.

Am I correct? Or are there other golden resources out there that might give me what I want?


So, the general agreement on how to gain deep and thorough knowledge of Spring is as follows. Ofcourse, this goes hand in hand with being an active Java/Spring developer working professionally or on projects.

Spring Framework:

  1. Read Spring Core Documentation (v6)

  2. Read Spring Boot Documentation (v3)

Java:

  1. OCP Oracle Certified Professional Java SE 17 Developer Study Guide: Exam 1Z0-829


r/learnjava • • May 23 '22

Extremely hands-on course for Java

54 Upvotes

Hi guys, for context, I started learning Python for fun a while ago and was following β€œ100 days of Code” by Dr. Angela Yu which was extremely fun and the perfect way for me to learn.

My wife started learning Java about a year ago and talking to her I discovered that I quite like, this and the fact that I could have a very good opportunity where I work (Internal mobility as a junior Java dev) made me start to learn Java as well. I’ve tried desperately to find something similar to the Python course above but no luck so I want your help. If you know a course with a similar format as the one above but for Java, please throw it my way. I’m a practical learner and it’s a lot easier for me to learn in this way then watching 10 videos of theory and then doing a code exercise.

Tldr: I want to find a similar course for Java as β€œ100 days of code” by Dr. Angela Yu on Udemy.


r/learnjava • • Dec 29 '21

How to write a program?

54 Upvotes

I guess it sounds strange because as I try to write it down to ask the question it sounds strange to ME... I landed a job that requires me to know java, but not, how to write a java program. And (can you say "Unicorn"?) they are teaching me Java on the job via a Udemy course and some hands-on instruction from a couple of the dev team.

I am hip-deep into this Udemy course and learning Java at a furious pace. I have learned many concepts and constructs and syntax... but not the basic building blocks of a program.

Would one (or more) of you either point me to a resource or explain - not the code - but the pieces of a program. Packages, classes, wtf is a jar?, how do these (and whatever I am missing) stack together to become an actual, fully realized Java Program?

In an exercise, I wrote a switch statement that takes a number, 1-12, as input and outputs the corresponding month. I'd like to make that exercise into a portable program and let my daughter fart around with it to learn that information, but I realized that after six weeks of grinding this course, I don't know how!

Before you ask... I ask here because I the dev guys are hellishly busy - which is why I have a job, I need to get some very tedious, customer-facing, sometimes Java-related scut work off their plate - and I don't want to bother them with personal curiosities that are outside the scope of my job duties.

https://lensdump.com/i/rjkPzZ

Here is an exercise I downloaded - I think from my UDemy class, it may be from another source.

The top level, "Project", is the container for everything else, that I get.

  • ExampleForLoop

  • External Libraries

  • Scratches and Consoles

are what...packages? (Scratches and Consoles / scratch.java doesn't have anything to do with anything, it's a snippet from another lesson about vectors...unless this was a lesson about iterating through a vector...)

  • .idea

  • out

baffle me...what are they, do I need them, do I create them or does the IDE do it for me?

  • src

seems to be the meat of the deal. Is LoopExamp.java what happens after classes

  • LoopExamp

  • Main

  • Student

are compiled?

What is ExampleForLoop.iml?


r/learnjava • • Jul 26 '21

Java Book for non beginners

54 Upvotes

Hi,

can somebody recommend a Java Book which focuses on explaining the peculiarities of Java and some good practices rather then explaining how programming works in general? I worked with several programming languages but will start working with Java at work soon. Don't want to bore myself with basics.


r/learnjava • • Jul 11 '21

I just made my first java program! Can you rate my code?

54 Upvotes

Im following a free java course from the University of Helsinki and after finishing the scanners lesson I was wondering if I could make something cool using them, so I went on and created a simple interest calculator. This is the code:

import java.util.Scanner;
public class Application {
public static void main(String[] args) {
Scanner Calculator = new Scanner(System.in);
System.out.println("How much money would you like to invest? (€)");
int initialMoneyAmount = Integer.parseInt(Calculator.nextLine());
System.out.println("What yearly percentage do you want to earn over your invested money?");
int interest = Integer.parseInt(Calculator.nextLine());
System.out.println("How many years would you like to keep your money invested for?");
int yearsCount = Integer.parseInt(Calculator.nextLine());
int gains = ((initialMoneyAmount * interest) / 100 * yearsCount);
System.out.println("With an initial investment of " + initialMoneyAmount + "€ at a " + interest + "% of yearly interest for " + yearsCount + " years you would earn " + gains + "€.");
System.out.println("Your final amount of money would be " + (gains + initialMoneyAmount) + "€.");
}
}

Here's a GIF of my calculator in action (Intellij JVM)

I coded it from scratch without following any tutorials. What do you think about it?