r/javahelp • • May 25 '21

i program in JAVA and decided to switch to visual studio code, some very noob questions

31 Upvotes

i get totally frustrated from the confusing terms used in Java, i program at the university and find myself angry on simple questions that seems like everyone know except for me.

1 - what is JDK ?in a website like this: https://www.infoworld.com/article/3296360/what-is-the-jdk-introduction-to-the-java-development-kit.htm

'' Developers new to Java often confuse the Java Development Kit and the Java Runtime Environment. The distinction is that the JDK is a package of tools for developing Java-based software, whereas the JRE is a package of tools for running Java code. ''

JDK is meant for developing tools for java?
so why do i need intelliji or visual studio code ? and why do i need to download special extension for visual studio code in order to code Java ? after all, JDK will tend to it, right ?

2 - in visual studio it says

'' Java 11 or more recent is required to run the Java extension. ''

but what is ''java'' ? JVM ? JRE ? JDK ? something else ?

3 - lets continue reading this website:https://www.infoworld.com/article/3296360/what-is-the-jdk-introduction-to-the-java-development-kit.htm

'' Getting Java setup in your development environment is as easy as downloading a JDK and adding it to your classpath ''

and what does that mean ? what is a classpath ?

do i need to install JDK ? because i got JDK from redhat and it didn't had any installer file there.

Summary:i really don't understand why programs like visual studio code or intelliji are making it so damn hard to even start programming java.
here is an alternative reality: when i download visual studio code, it already download JDK (mind blowing, i know) , put it in correct place in the files, and set the ''classpath'' by itself. why do i need to tend to all of this stuff ?


r/javahelp • • Jan 15 '21

Do you know any site where I can find java code with errors (that I have to spot), so that I can practice for the exam?

31 Upvotes

Do you know any site where I can find java code with errors (that I have to spot), so that I can practice for the exam?


r/javahelp • • Nov 22 '20

Building a Java REST API

31 Upvotes

Lets start with REST, what is it? REST is an architectual style, which in most cases is based on HTTP protocols to communicate between different services/clients. It’s in it’s simple sense a set of constraints and properties used to define such communication. When HTTP is used the following operations are avalible:

  • GET — Request data from a specified resource (Get relevant posts on your Facebook Wall)

  • POST — Submits data to be processed (e.g save a user in a Database)

  • PUT — For saving or updating a resource on the server

  • DELETE — For deleting a given resource

With the basic understanding of how API’s are used and what operations are available over HTTP, it’s time to look into how such can be implemented. Within large web applications we will often need several API’s in order to process and offer different services like e.g creating users, saving posts and editing of profile information. When web API’s are combined we often refere to them as a Mashup. See the full implementation tutorial at:

https://medium.com/vinsloev-academy/building-a-java-rest-api-9b36b295fa58


r/javahelp • • Sep 07 '20

I had a coding interview challenge sent to me by an employer and I would like some opinions

31 Upvotes

So the problem goes something like this:There's this manager that is so busy he gets to have a good nap once a week between meetings. The week starts on Monday at 00:00 and ends Sunday at 24:00. The task is to write a function:

public int solution(String schedule){

// return answer

}

That returns the longest amount of minutes this manager gets to sleep this week. His schedule comes in the form of a String that looks like:

"Sun 10:00-20:00\nFri 05:00-10:00\nFri 16:30-23:50\nSat 10:00-24:00\nSun 01:00-04:00\nSat 02:00-06:00\nTue 03:30-18:15\nTue 19:00-20:00\nWed 04:25-15:14\nWed 15:14-22:40\nThu 00:00-23:59\nMon 05:00-13:00\nMon 15:00-21:00"

Where the string is in the form of Ddd HH:mm-HH:mm (Ddd is a 3 letter day of the week, HH:mm is the start-end time of the meeting).
There is no overlap (there can't be two meetings at the same time).

The right answer for the above example is 505 minutes.

So I had about 2 hours to solve it and I did, but all I could do is make it work. I found it interesting so I solved it using OOP. I want opinions on the best OOP practice you could use here (maybe something like a design pattern?). Post your gists in the comments.

Here is my solution:https://gist.github.com/Dimitrov1295/c4bd075992e258f651815c9d50b36483


r/javahelp • • Sep 01 '20

Spring Boot - When to use an interceptor vs filter?

31 Upvotes

I've searched around and I can't really find a clear explanation on the difference between the two and when I would use one over the other.


r/javahelp • • Jul 11 '20

Learn Java programming using graphics (free course)

31 Upvotes

Learn (Java) programming using graphics (free course).

I'd like to offer to teach people how to program in Java using a graphics-based approach. Java's quite easy to learn -- if you have help -- and graphics make it so much more interesting than just doing console-based programs. Why am I doing this? Beause I want to try to some ideas about how to improve my online teaching for September. I also want to give back to the community.

I intend to limit the course to 10-12 people in order to have time to give people whatever help they need. I don't really care what level of programming background you have (unless you're an expert in which case this is not for you); we'll be starting from scratch.

I use Eclipse IDE (you can use whatever IDE you want) and we'll be using a simple graphics library that's based on Swing called HSA2.

Here's the outline

1. Basic java syntax
	variables, system.out.print / println
	integer vs floating point math

-- Start Graphics --

2.  Basic Drawing (using Swing commands)
	- random numbers (balls)
	- for loops (lines)
	        extra: mathematical pixel art

3.  Breakout Game
	- arrays, objects, gameloops
	- methods if we haven't done them in 1. or 2.
	- mouse input
	- intro to inheritance (for making different types of blocks)

4.  Morph Breakout Game into Space Shooter game 
	- arraylists, bullets/lasers
	- possibly add in images/sprites
	 		extra: add sound?

5.  TicTacToe (depending on interest)
	- 2D arrays. 
	- Logic

I'm not sure what the duration wold be, a few weeks? In terms of time commitment I'd think that 5 hours a week would be minimum. We can progress a lot faster if people put more into the course.

I'm planning to seting up a group on Slack and communicate that way. It's easy to post code, post documents, have discussions, Q&A, help each other ... I'll probably end up making a couple more videos too. Other resources are on Github (1) (2) (3).

Without regular participation on Slack it won't work. It's going to be very much like mentorship or tutorials and I'll have to know what you're working on, what problems you're encountering, if you're still alive ...

If you would like to participate, please let me know and I'll reply within 24 hours. I'll DM your the signup link.


UPDATE

I've got 15 people so far, so THAT"S IT. NO MORE ROOM.


r/javahelp • • Nov 07 '19

When is the .equals() method actually used in Java?

31 Upvotes

This may seem like a basic question, but looking online I haven't been able to actually understand when the .equals() method of a class is actually used, and when you should override it.

It is said you override it to determine logic for identifying when two objects are equal, but when I look at places where we actually compare objects - Comparator and Comparable, these both require you to implement compare()/compareTo() methods (or using the static comparing() method in Java 8) that handle the comparisons, so equals() is never used in them.

I'm trying to understand when I actually need to override the .equals() method, but I can't find an example that shows where it is actually used when overridden!


r/javahelp • • May 22 '26

Deep Java Learning Guide

30 Upvotes

I want to become a strong backend engineer and I’m planning to learn Java deeply along with Spring Boot and Microservices architecture.

There are so many courses and playlists online that I’m confused about what’s actually worth following seriously for long-term growth.

I’m looking for recommendations for:

Core Java

Advanced Java

Spring Boot

Microservices

MySQL/Database design

Backend engineering fundamentals

Industry-level project building

I don’t just want tutorial-level knowledge. I want resources that help build strong engineering fundamentals and real-world backend skills.

Would love recommendations for:

Best YouTube channels

Paid courses

Books

Roadmaps

Any underrated resources

Also, should I focus more on:

Java + Spring ecosystem deeply or

Full-stack development with many technologies?

Would appreciate guidance from experienced backend engineers.


r/javahelp • • Oct 02 '21

Can someone please explain the difference between List and ArrayList like I'm five?

30 Upvotes

What exactly is the difference between

List<String> inputs = new ArrayList<>()

and

ArrayList<String> inputs = new ArrayList<>()

I've read some stuff about it but I'm a bit confused and I don't feel like I understood completely. Can someone explain the difference with some examples? Thank you!


r/javahelp • • Jun 07 '21

Codeless How to master spring?

30 Upvotes

I already know spring and spring boot adequately well I'd say. I learned it by simply diving into it with random online tutorials and because I needed it for work (3 years of experience).

However I'm looking to hone my skills further. Is there any clear way to do this? (Aside from grinding through the docs?)


r/javahelp • • Jan 21 '21

Solved Float vs Double | After some googling it occurs to me there in not really any reason to use Float, has Float become an outdated data type?

30 Upvotes

wow, such empty


r/javahelp • • Oct 22 '20

How to learn Spring boot as a beginner?

30 Upvotes

Hi everyone, I just recently started learning Java after 5 years of not coding (basically, it's like I started from scratch). Now, I want (or need because job requires to) to learn Spring boot but every book I preview or the tutorials I watch throws terms that are unfamiliar to me -- like EJBs, Servlets, Maven, build tool, Thymeleaf, Beans and many more. It's like these books/tutorials, although claiming to be for beginners, assume I should already know these things. If it's imperative I know these terms, then I don't feel comfortable moving on with Spring boot without having knowledge of these things first.

If anyone can give me input as to how I should learn Spring boot like -- what are the pre-requisite knowledge should I acquire? Currently, what I have studied so far is Core Java.

Thanks for any help!

Edit: Thanks for the answers so far. From what I'm getting, Core Java to Spring boot is a bigger leap than I anticipated. Atleast now, I can plan my learnings from your suggestions.


r/javahelp • • Sep 20 '20

I'm an Beginner in Java, and I wanna program a small 2D Game one day. Whats the easiest way to learn it?

30 Upvotes

Especially I wanna learn how to design GUI's and how you use Images and let them interact with each other. Does someone now a good Tutorial or sth. else?


r/javahelp • • Aug 25 '20

Abstract classes are useful in java 2020?

30 Upvotes

I've learned recently that with interfaces you are able to make default methods with custom modifiers and they work equal as abstract class default method.

In our cs class i was taught that abstract classes benefits were the implementation of defaults methods, but in modern versions of java, interfaces can do the same, while a class can implements multiple interfaces.

Is there something that abstract classes do that interfaces can't.


r/javahelp • • Aug 01 '20

Codeless How would I learn more java?

30 Upvotes

I used sololearn to learn the basics of java and want to learn more, is there a way I can learn more java with a resource that teaches me and then asks me questions, just like sololearn? (I'm not sure if this is the correct tag or not)


r/javahelp • • Jul 26 '20

Solved Took 13s to build a hello world program

30 Upvotes

i decided to learn java today and write a hello world program, and as the title suggest, it took my machine 13 seconds to build. Is it normal?


r/javahelp • • Apr 19 '20

Code academy is offering 90 free days. When do I use it? (Complete novice here)

30 Upvotes

The basic intro java course is free and this is day 2 of my learning. When should I activate the trial? I was thinking it wouldn’t be worth it if I’ll be using a free course for now anyways...


r/javahelp • • Oct 24 '19

How to get my decimal to print as "$12.00" and not $12.0"

30 Upvotes

I am writing a "game of chance" code where you roll a die and each number is associated with the prize. When I print the results I seem to be getting $12.0 instead of $12.00. I am sure this is an easy fix but I am new and need some guidance.

here is my code for the results to print out:

System.out.printf("%-20s%-15s%-20s%-20s\n", "Game Result", "Value", "Booby Prize",

"Description");

System.out.printf("%-20s$%-15s%-20s%-20s\n", result1Desc, prize1Value,

boobyYN, prize1Desc);

System.out.printf("%-20s$%-15s%-20s%-20s\n", result2Desc, prize2Value,

boobyYN, prize2Desc);

System.out.printf("%-20s$%-15s%-20s%-20s\n", result3Desc, prize3Value,

boobyYN, prize3Desc);

System.out.printf("%-20s$%-15s%-20s%-20s\n", result4Desc, prize4Value,

boobyYN, prize4Desc);

and here is what my output looks like (some of the games haven't been written in yet):

Game Result Value Booby Prize Description

1: Flipped Tails $0.49 No 9v Battery and Wire

2: Rolled 4 $12.0 No Compilation CD

null $0.0 No null

null $0.0 No null

Thanks your your time and help!

u/SubjectOgre


r/javahelp • • Oct 15 '19

Can you explain to me what a hashmap is and how they are used simply?

30 Upvotes

Having some trouble understanding hashmaps. Need help.


r/javahelp • • May 04 '19

Solved Java (Spring Boot) and Docker done properly?

30 Upvotes

When containerising an application, all tutorials on Java seem to want you to build a jar locally and copy it from target into a container in the Dockerfile. However, this contradicts the whole idea behind using Docker because building on my machine will not necessarily be the same as building on a colleague’s machine.

I can’t find a tutorial that describes using Maven via Docker to build the jar and moving the result to a Java container i.e. via staged builds. This would ensure consistency across machines and follows the whole Docker ethos.

Can anyone recommend a way to do this or point me to a good tutorial?


r/javahelp • • Feb 06 '26

Is learning Spring Boot still a safe bet for 2026 placements?

29 Upvotes

I am a B.Tech student with only one semester remaining before I begin my placement season.I am currently focusing on backend development with Spring Boot because I'm good in java. My primary interests are cloud computing and microservices.

Recently, I've seen many of my peers moving toward the MERN stack, and I've also heard a lot about Go (Golang). This has made me a bit nervous. Is Spring Boot still relevant for modern projects in 2026, or should I consider switching to Go or MERN?

I prefer backend work and use AI tools to handle the frontend parts of my projects so I can showcase my backend skills. I would love to hear from industry professionals about the current demand for Spring Boot in the microservices and cloud-native space.


r/javahelp • • May 20 '24

What is the most efficient way to learn java

29 Upvotes

Hello,

I started learning Java five months ago. I joined Udemy courses and tried to learn from YouTube and other Java Android courses, but I'm lost. I don't understand anything, and I don't know what to do. Do you have any advice?


r/javahelp • • Sep 12 '21

So confused why 1.1 + 2.2 == 3.3 returns false

29 Upvotes

title


r/javahelp • • Jan 12 '21

I want a website like leetcode but which has problems starting from the most basic level to make my basics strong

29 Upvotes

So that i can improve basic topics like lopps and data structures and then be able to solve leetcode programs easily. Help would be appreciated because i really need it for my placement training.