r/javahelp • • Oct 17 '25

Is IntelliJ the most commonly used IDE? If so, which one is used by most people, the free one or the paid one?

24 Upvotes

I’m new to Java and currently learning it. I’m currently using IntelliJ community edition free version cuz the other one is paid. Idk if I’m missing any important features that’s only exclusive to the paid one. Can choosing the paid or free one affect the development of projects I might make in future?


r/javahelp • • Mar 01 '25

Codeless Is it just me who’s too stupid for generics?

24 Upvotes

Hey guys. Currently learning Java and having a really hard time getting what are generics. It’s still difficult for me to use arrays, but generics is something beyond that. There is just too much information to keep in mind. I feel pretty close to give up on studying. Appreciate any tips! т_т


r/javahelp • • Apr 30 '24

Codeless Is “var” considered bad practice?

24 Upvotes

Hi, so recently we started migrating our codebase from j8 to j17, and since some tests broke in the process, I started working on them and I started using the var keyword. But I immediately got scolded by 2 colleagues (which are both more experienced than me) about how I should not use “var” as it is considered bad practice. I completely understand why someone might think that but I am not convinced. I don’t agree with them that var shouldn’t be used. Am I wrong? What are your thoughts on var?


r/javahelp • • Mar 22 '23

In a class constructor, is it better to explicitly initialize the fields, or to call setter methods, or is it all the same?

24 Upvotes

Is this better?

public MyClass(String item){
    this.item = item;
}

Or this?

public MyClass(String item){
    setItem(String item);
}

Or are they the same?

I have been taught both ways, but one professor said that the second method was more secure. I'm not sure why though.


r/javahelp • • May 30 '21

Codeless How to protect a spring boot API

24 Upvotes

Hi All,

Long time lurker here.

So I’ve been slowly learning Spring and I’m at the point where I have my spring boot api that uses elastic search, Auth0 and mongo and I’m pretty happy.

Now this API is still pretty basic, it allows users to post content almost like a blog article and retrieve their posts.

Now I’ve a question, I want to make sure I’m not open to any security issues like XSS attacks and the likes.

Can someone here recommended how I should do this? Basically for instance, one of my controllers accepts a DTO (JSON) and I want to sanitise the inputs as really you can post anything to the endpoint and it will just save it on Mongo. If it helps I’m using Mongo operations rather than JPA Repository

The closet I came on Google was a baledung article using OWASP esapi but that seems way outdated now.

Any help would be must appreciated


r/javahelp • • May 02 '21

OpenJDK or OracleJDK?

24 Upvotes

I'm learning java, I'm under Ubuntu, and i larned it with the oracle's one. I would like to make some software, some applications and stuff, so I was about to change to OpenJDK for license thing and all, but i have read that the Oracle's one performes way better...
Is this true?


r/javahelp • • Apr 15 '21

Codeless Need advice: Java Software Architecture for SaaS startup doing CRUD and REST APIs?

24 Upvotes

First post!

I'm helping out a SaaS startup on the technology stack and software architecture. I'm a Node and .Net software architect, with only bits of Java knowledge. Our developer team want to use Java because that's their preferred platform.

I'm not up-to-date with software architecture choices for Java. My first plan is to start with a modular monolith than we can split out into microservices as the startup grows. We'll use Postgres and Redis for data and caching. I'm not familiar with Java specific solutions for messaging, JPA or REST frameworks.

The business is a Accountancy system for restaurants, so it's a fairly straightforward LOB business with CRUD and bits of integration to 3rd party REST API. In a previous company we use JHipster to generate the backend scaffolding from a annotated data model, and it worked well for that company.

My question: Is JHipster still a valid choice for a startup that will want to grow eventually to use docker containers? (Short term plan is to not use K8s, until we need that complexity).

Are their other Java frameworks that I should research for fast iteration of the backend?

Any recommendations appreciated, cheers 🍻


r/javahelp • • Apr 05 '21

Misunderstood love for Eclipse

24 Upvotes

Here is the thing, i have tried both IDEs and literally every single person says intellij is way better but i feel way more confortable using Eclipse.. my ultimate objetive is to make android apps with android studio, is intellij better for android studio?? What makes intellij so much better than eclipse??

I feel kinda empty coding in intellij but eclipse makes me happy


r/javahelp • • Jan 19 '21

I've just been made team lead and I need your help. Please give your suggestions on best practices and leading the team well.

24 Upvotes

Asking this here since my primary tech stack is Java and related frameworks. I've been made team lead for a small project in a new company. I've only got couple of years experience in the tech stack.

Therefore, I've started reading on books like Secure Coding, Clean code, Design Patterns to be able to effectively suggest secure and best possible solutions to be problem. However, I don't think I will have the time to read more books and gain the know-how of other various things.

So, I want to ask, starting from the inception of the project to its conclusion,

  • what are the things the team lead should take care of ?

  • what are the must do things before starting with application developement

  • what are the things to consistently take care of during application development

  • what are the things to be sure of before the application deployment.


r/javahelp • • Jan 02 '21

Homework Good Udemy courses to learn about microservices architecture and design using spring cloud

24 Upvotes

Are there any good Udemy courses available to learn about microservices architecture, like breaking Monolith into microservices for someone having few years of experience?


r/javahelp • • Dec 28 '20

What is the advantage of using an enum over a final String array?

24 Upvotes
private static final String[] drawColor = {
	  "RED",
	  "YELLOW",
	  "BLUE"
	};

private enum drawColor{
	   RED,
	   YELLOW,
	   BLUE
}

r/javahelp • • Sep 17 '20

Best way to revise java for college?

24 Upvotes

Starting college soon for software development. I did a 1 year course for computer science (PLC course in Ireland for those that know what that is). That course ended at the beginning of May and I have done zero coding since. What are the things that I should revise to make my first semester in college much easier? And what are some good sources?


r/javahelp • • Aug 18 '20

Does anyone know how to create a pdf file in java?

24 Upvotes

I need to generate some automated reports using java. I am using iText for it but it is not formatting the files properly. Does anyone know what I should use to generate these reports?


r/javahelp • • Aug 10 '20

Unsolved Spring Boot/Cloud: How to share API interfaces between multiple microservices?

24 Upvotes

So i want to build multiple RESTful microservice with Spring Boot/Cloud and was wondering how they communicate with each other.

Example: There is microservice A and microservice B which are two seperate Spring Boot applications and projects. B needs data from A, so B needs to know the API from A. In the project of A a interface is defined for the API (REST controllers and their HTTP mappings).

The easy way would be to just copy this interface from project of A to project of B. But that's obviously non-ideal because of the DRY principle.

So whats the best way to share interfaces accross multiple microservices using Spring Boot/Cloud?

I thought about sharing the API interfaces accross my microservices and communciate between those using the interfaces and Feign Clients. Is there maybe a better approach anyway? What the state of the art here?


r/javahelp • • Aug 08 '20

Spring boot backend/React frontend: is it good/common practice to run frontend and backend on the same domain?

24 Upvotes

This may be a stupid question. I’m fairly new to actually thinking about the design of my web applications.

Is it common practice/smart to build my web app in a way that spring boot would be running on localhost:8080 and my frontend(made with React) running on the same port?

From there I could hit my Rest controller at localhost:8080/api and my homepage at localhost:8080/home

Bonus question: where should I start when I have more questions like this?


r/javahelp • • May 31 '20

At what point do you know you can put your Java learning into actual things?

24 Upvotes

Hi Everyone.

As recommended, I'm taking John Purcell's Java for Complete beginners.

I also see he has 5 or 6 other tutorials that are very long.

I'm wondering, when do I know I have enough JAva skills to actually build something? I wouldn't want to sit there going throug tutorials all hte time without actually putting something into practice.


r/javahelp • • May 26 '20

Spring Boot - current courses

24 Upvotes

Hi everyone!
I'm trying to learn Spring, so I'm looking for Spring boot courses, which are still current. I know about spring.io but I just want to learn by video course. I found a post from a year ago, where some guys proposed:

  1. John Thompson - Spring Framework 5: Beginner to Guru.

  2. Chad Darby - Spring & Hibernate for Beginners.

I don’t know if that content of that courses are still current and worth 40 hours of study. If it's not worth, would you recommend me something other?

Thanks!


r/javahelp • • Mar 28 '20

More a tip, but hope it helps...

24 Upvotes

I am a science teacher but mess around with code for fun, I just started learning Java and after using jGrasp for a while, I moved to Visual Studio Code with about 1000 plugins, after having issues debugging I decided to just download Eclipse and check it out.

I don't know why I wasted my time with the others. Eclipse is awesome. It just makes using Java so much simpler...

EDIT: So I just installed IntelliJ... So far it seems way better more modern compared to Eclipse. Thanks.


r/javahelp • • Jan 21 '20

Homework Fairly new to Java, help me with this code consisting of two classes.

24 Upvotes

I made an object of the class TestStudent and I want to store info of 5 students but the line 22 returns NullVariableException while scanning the name and id.

This is my code.

Please tell me some other way to achieve it if you can.


r/javahelp • • Nov 02 '19

Codeless How to "see" things in an object oriented way?

24 Upvotes

I had an exam recently and it went pretty good, but there was a question that threw me off. No coding involved, just draw a tree linking different class names, interfaces, abstract methods, etc. and how they should interact with each other. My biggest gripe was when to use interfaces and abstract methods, like I still have no idea when to use them and why they are necessary. For example, if I make a class Animals it would have Dog, Cats and Parrots as sub-classes of Animal. I'd put methods like eat() in Animals which Dog and so on will inherit. Let's say dogs are carnivorous, cats are herbivorous and parrots, both. How would I proceed to link these concepts to eat()? I have no idea what to do...


r/javahelp • • Sep 30 '19

What features did Java have that you wished you've learned way back?

24 Upvotes

An offshoot of a post from r/learnprogramming, but since I want to concentrate on Java for now.

Thanks everyone!


r/javahelp • • Jun 11 '19

How do you structure a GUI?

24 Upvotes

In the past, I've always put all of the code into one class, but I know it's probably not the best thing to do. I can structure the logic of a program, but when it comes to the GUI, I'm stumped. How should one structure a GUI?


r/javahelp • • Jan 25 '19

Solved I want to try java for web development.

24 Upvotes

So real quick, I know the following:

all the fundamentals and a lot of the advanced topics of java HTML to advanced level CSS to advanced level Not that great at javascript, though I can work with it.

I want to start trying to use java for backend(web dev), I have no idea where to start. Is there a 'best' framework and where should I go to learn? I prefer docs/reference sheets but videos work too.


r/javahelp • • Aug 21 '17

I just wanted to say thanks

24 Upvotes

I was doing my final today, and you guys helped get me on the right path. thanks a bunch. This is my first java program and it works as intended... after 18 hours of trial and error.... Im going to bed.. Thanks again

        package authentication;

        import java.io.*;
        import java.util.Scanner;
        public class Authentication {

        public static class variables{
        File file = new File("src/authentication/credentials.txt");
         int tries;    
         int lineNum;
         String line;
        String Username;
        String Hash;
        String Password;
        String accounttype;  
         String Userinput;
         String Passinput;
         }    
            public static void promptEnterKey(){
                System.out.println("Press \"ENTER\" to log off...");
                try {
                    int read = System.in.read(new byte[2]);
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        public static  void main(String [] args)throws FileNotFoundException {
        variables myvars = new variables();       
        Scanner scanner = new Scanner(myvars.file);
        File admin = new File("src/authentication/admin.txt");
        File zookeeper = new File("src/authentication/zookeeper.txt");
        File veterinarian = new File("src/authentication/veterinarian.txt");
        myvars.tries=3;

        while(myvars.tries>0){
               try {     
                    Scanner Uscanner = new Scanner(System.in);
                    System.out.println("enter Username");
                    myvars.Userinput=Uscanner.next();
                    Scanner Pscanner = new Scanner(System.in);
                    System.out.println("enter password");
                    myvars.Passinput=Pscanner.next();

                    while (scanner.hasNextLine()) {
                        myvars.line = scanner.nextLine();
                        String[] parts= myvars.line.split("#");
                             myvars.Username= parts[0];
                             myvars.Hash= parts[1];
                             myvars.Password= parts[2];
                             myvars.accounttype= parts[3];
                         if (myvars.Username.contains(myvars.Userinput)){
                          break;
                             } 
                    }

                if (myvars.Password.contains(myvars.Passinput)&&myvars.Username.contains(myvars.Userinput)){

                        if(myvars.accounttype.equals("admin")){
                               Scanner adminscanner = new Scanner(admin);
                            while(adminscanner.hasNextLine()){
                                String adminline =adminscanner.nextLine();
                                System.out.println(adminline);
                              }
                            promptEnterKey();
                            break;    
                        }
                        if(myvars.accounttype.equals("zookeeper")){
                        Scanner zookeeperscanner = new Scanner(zookeeper);
                            while(zookeeperscanner.hasNextLine()){
                                String zookeeperline =zookeeperscanner.nextLine();
                                System.out.println(zookeeperline);

                            }
                            promptEnterKey();
                      break;   
                        }
                         if(myvars.accounttype.equals("veterinarian")){
                            int veterinarianlineNum = 0;
                             Scanner veterinarianscanner = new Scanner(veterinarian);
                            while(veterinarianscanner.hasNextLine()){
                                String veterinarianline =veterinarianscanner.nextLine();
                                System.out.println(veterinarianline);
                                veterinarianlineNum++;

                            }
                            promptEnterKey();
                            break;
                        }
                     }else{
                    myvars.tries= myvars.tries-1;
                    System.out.println("Nope "+myvars.tries+" tries left ");

                }    

                    }catch(FileNotFoundException e) {  }


                }
        if (myvars.tries==0){
          System.out.println("Please contact your systems administrator");
        }

            }

        }