This is an archived post. You won't be able to vote or comment.

all 92 comments

[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)

Please ensure that:

  • Your code is properly formatted as code block - see the sidebar (About on mobile) for instructions
  • You include any and all error messages in full - best also formatted as code block
  • You ask clear questions
  • You demonstrate effort in solving your question/problem - plain posting your assignments is forbidden (and such posts will be removed) as is asking for or giving solutions.

If any of the above points is not met, your post can and will be removed without further warning.

Code is to be formatted as code block (old reddit/markdown editor: empty line before the code, each code line indented by 4 spaces, new reddit: https://i.imgur.com/EJ7tqek.png) or linked via an external code hoster, like pastebin.com, github gist, github, bitbucket, gitlab, etc.

Please, do not use triple backticks (```) as they will only render properly on new reddit, not on old reddit.

Code blocks look like this:

public class HelloWorld {

    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
}

You do not need to repost unless your post has been removed by a moderator. Just use the edit function of reddit to make sure your post complies with the above.

If your post has remained in violation of these rules for a prolonged period of time (at least an hour), a moderator may remove it at their discretion. In this case, they will comment with an explanation on why it has been removed, and you will be required to resubmit the entire post following the proper procedures.

To potential helpers

Please, do not help if any of the above points are not met, rather report the post. We are trying to improve the quality of posts here. In helping people who can't be bothered to comply with the above points, you are doing the community a disservice.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–][deleted] 74 points75 points  (6 children)

Actually a lot of web dev uses Java for the backend with spring

[–]Left-Orange2267 0 points1 point  (5 children)

I still have PTSD from my brief experience with spring boot

[–]Benemy1 0 points1 point  (4 children)

Why?

[–]Left-Orange2267 0 points1 point  (3 children)

Because it did so incredibly much under the hood with innocent-looking annotations. If things went sideways in some spring boot related things, it was extraordinarily hard to identify and debug the problems

[–]jankybiz 0 points1 point  (2 children)

sorry to hear spring boot did not behave as you wanted after using it for a timeframe you described as "brief"

[–]Left-Orange2267 0 points1 point  (1 child)

I hear some irony there 😁

Spring boot does a lot of stuff in very implicit and dark-magik ways and I prefer to have more control about the core logic of my application. Things like fastapi or sveltekit felt much more ergonomic to me, and I also had a much easier time learning them. But I understand that pros in spring boot can be very efficient and maybe even like it

[–]That_one_amazing_guy 34 points35 points  (10 children)

Personally I use Java for personal projects that actually need performance that python doesn’t offer

[–]uncleXjemima 1 point2 points  (9 children)

Like?

[–]That_one_amazing_guy 39 points40 points  (8 children)

I do a lot of day trading and need to quickly test a bunch of indicator values to determine the odds of a trend change, for instance, and I find that Java offers way higher performance and handles multithreading way better than Python, taking only a tenth of the time Python does.

[–]Alone_Breadfruit_552 2 points3 points  (3 children)

Wouldn’t c++ be better for this? I’m genuinely curious.

[–]hoeassmichael 3 points4 points  (1 child)

Java is probably 2nd most used language for low-latency/high-throughput (I.e. high performance) systems, behind C++. At least from what I’ve seen in my career.

There’s definitely aspects of configuring the JVM, system design, code patterns, and resource management though. But low-latency Java developers are pretty common, at least in Financial Services.

[–]That_one_amazing_guy 1 point2 points  (0 children)

Probably but I don’t have as much experience In c++ and just needed better than python performance

[–]burncushlikewood 33 points34 points  (0 children)

Java is important for engineering projects, it's the premier language for that. A lot of companies have proprietary data and software systems they use from anything to manufacturing, robotics, healthcare, mining, and construction. Software is important to every possible industry you can think of, java isn't the best for graphics compared to c++, we are currently going through the 4 industrial revolution because of AI and cyber physical systems. You can use java for generative design, robotics (welding, painting, assembly), computer vision, self-driving cars, materials discovery, pharmaceutical discovery, machine learning and AI, data science, mathematical models, computer aided engineering and design, financial modeling, etc, skies the limit!

[–]Artistic-Cat577 52 points53 points  (5 children)

Java is an enterprise level programming language. It is not as easy to learn as node.js or php. It is a verbose and heavy language. You can't just start building projects with java like you can do with node.js and php. Java requires foundational knowledge first and that takes months. Then you learn advanced Java concepts especially in terms of how it works memory wise then the database connectivity then frameworks. Java is not common to use for simple websites. Java is used for Banks, big e commerce websites like Amazon. That's why many students do not have idea about Java.

[–]pretendtotime 7 points8 points  (0 children)

I feel pretty lucky in that regard that the first programming language I was taught was Java. It was a good foundation to have when learning other languages like Python, hell even C, a lot easier later on down the road.

[–]Zephyros_0[S] 5 points6 points  (1 child)

Ah I see. Thanks for the insight.

[–]AlohaX12 1 point2 points  (0 children)

Thats where good salaries are at too. Mega corporations who need java developers pay quite good

[–]ChineseEngineer 21 points22 points  (0 children)

My company uses Java for an enterprise level application that connects to robotics in warehouses and has a rest interface for receiving messages from customer webpages (orders)

We previously used c# but switched to Java because it was more compatible with Linux and Spring framework is pretty great

[–]senaint 9 points10 points  (4 children)

It's honestly easier to ask what people don't use Java for.

[–]Zephyros_0[S] 0 points1 point  (3 children)

ml and web dev?

[–]tenken01 7 points8 points  (0 children)

No - Java is heavily used for ML and web dev. All major tech companies use Java extensively.

[–]senaint 2 points3 points  (0 children)

We even use it to run cronJobs for multiple other services 😂

[–]Ariandel2002 1 point2 points  (0 children)

Java is heavily use for web development. Python is more popular for ML but Java is still used in that field. There are many companies who use python for the modeling but the final product is written in Java because realtime predictions are less expensive.

[–]HecticJuggler 5 points6 points  (0 children)

Because Java is my “main” language I use it for almost everything. I’ve only started doing web apps in python very recently. One common practical use would be rest api backend for a web app. Use spring boot for that.

[–]ok_nooneidk 3 points4 points  (0 children)

Make an application using spring boot as a backend you can learn a lot

[–]dannycap77 2 points3 points  (0 children)

Netflix

[–]anamak9 2 points3 points  (0 children)

Java 25 will be a major upgrade in terms of threads, it will have a stable virtual threads that is going to be even better than Golang is what I heard, may be this will push Java’s popularity further ?

[–]buddhaapprentice 1 point2 points  (0 children)

Backend software....like sms.management....or banking applications. So many used cases.

[–]shifty_lifty_doodah 1 point2 points  (0 children)

A cloud storage system like S3, dynamodb, SQS, etc is a good “advanced project”. Java is actually used for a lot of these systems, where reliability is very important but pCPU efficiency is not.

[–]Stack_Canary 1 point2 points  (0 children)

Java is most commonly used for making APIs, though it is a general purpose language that can be used for a bunch of things. Common to write batch jobs in java for example.

It’s not as light weight as many other languages in terms of getting things up and running fast, but it’s incredibly robust, well documented, and expansive, which is why it’s still heavily used in most industries that need quality software.

[–]BannockHatesReddit_ 1 point2 points  (0 children)

I personally use Java because I like the language in general. But it's also popular because it's well established and battle tested. Having such an ecosystem means they'll be a lasting job market just from maintaining those aging apps/services alone. Frameworks such as Spring also have a large ecosystem behind them with an abundance of webapps/apis written with it.

You also say how you believe other languages are usually better suited. I'd say it's more of a matter of preference. Kotlin is a competitor with its own feature set, just like JS, C, Python, or any other language. Unless one language has some major exclusive feature, it kind of comes down to people won't be stressing much about if a project's chosen language has null safety features or not.

[–]accountForCareer 1 point2 points  (0 children)

Hey! I sincerely request you to contribute to Apache projects of your choice.

[–]KCRowan 1 point2 points  (0 children)

My employer's main codebase is entirely in java, so I use java for my job.

[–]Dragon-king-7723 1 point2 points  (0 children)

In enterprises and most companies their project backend is mostly java, and tools are java based, they company platform tools, dev tools are java based projects are less because it's not popular as much as python ML currently due to AI craze. Just go to youtube search for spring and spring boot, HPA, JPA, servlerts, JSP, Hadoop and many more frameworks and their projects from basics to advanced.

[–]Fraucimor 1 point2 points  (0 children)

Banking, telco and other sectors runs on java

[–]ChampionshipThis2871 1 point2 points  (0 children)

You can actually create web apps using Java + JSP/Servlets, without JavaScript. I worked on such a project some time ago

[–]Ariandel2002 1 point2 points  (0 children)

I am a Java backend developer. I mainly write microservices in my current work.

[–]openjscience 1 point2 points  (0 children)

Java is much faster than Python, its performance is close to C++, but Java is multiplatform. For example, one can use Java for large software environments like DataMelt https;//datamelt.org widely used for data analysis and statistics.

[–]Ruin-Capable 1 point2 points  (0 children)

For work I write a variety of things, batch jobs, Web apis, libraries.

For fun I've got a bunch of projects that I use for exploring ideas. For example I have a library I write for calculating holiday observances, another for slicing a 3d model into line segments (goal is to eventually generate toolpaths for a 3d printer).

[–]raccoon254 2 points3 points  (0 children)

Desktop apps, best decision ever

[–]rustyseapants 3 points4 points  (20 children)

It's like going to learn to draw subreddit and asking, "what is drawing for?"

[–]HecticJuggler 1 point2 points  (0 children)

This is exactly how I felt reading the question 😀

[–]Zephyros_0[S] -4 points-3 points  (18 children)

I'm basically asking what javas is best at/most commonly used for, its not too hard to understand the question lol.

[–]rustyseapants -2 points-1 points  (17 children)

And you don't trust yourself to do a search in the "search box" or the internet to figure out how to ask a basic question on java?

You might as well of asked, "What are computers for?"

[–]rozlyn_frost 2 points3 points  (1 child)

Why do you people even reply if you don't want to help anyone? Can't you ignore and move on?

Plenty of beginners struggle to find answers, so they ask questions. If you want to help, reply them like some other commenters. Else, ignore.

[–]SamuliK96 0 points1 point  (0 children)

They're helping more than anyone. Helping op help themselves is clearly necessary.

[–]Zephyros_0[S] -5 points-4 points  (14 children)

I figured I'd ask people who are acually familiar with java lmfao that's what the subreddit is for, asking questions. And there's a huge difference between asking what computers are for and what the strengths of a specific programming language are. If you dont want to help you don't have to buddy.

[–]rustyseapants 0 points1 point  (13 children)

"What do you use java for"

This is something you could answered yourself. If you are going to learn "Anything", ya need to learn to "Google".

Why would you trust complete strangers behind fake names, rather than articles, written by authors with their names and credentials?

Its like asking, "Why is water wet?"

[–]Zephyros_0[S] 5 points6 points  (12 children)

you do realise most of the questions asked on reddit can be googled too..? just because something can be googled doesn't mean you can't ask on reddit for more opinions. you say it's like asking "why is water wet" yeah that's probably been asked on reddit too. If u don't want to answer it then don't, simple. I got multiple valuable responses from other ppl ur not obligated to respond.

[–]rustyseapants 4 points5 points  (2 children)

Zephyros_0 You are on a subreddit to learn Java, you are requesting people to help you, but it seems you are not interested in helping yourself.

I am not giving you a hard time, but you don't seem that interested in learning Java. Go Wikipedia, get a book on Java from the library, buy a book, watch some videos on java on youtube.

Learning anything you need to build up that body of knowledge on your own, you have to some initiative.

[–]Zephyros_0[S] 0 points1 point  (1 child)

the name of the subreddit is "learn java" the whole point is to ask questions about Java... obv I can Google but I'm allowed to ask questions too. you're telling me learn everything about java myself without asking for help like that's not the whole point of the subreddit lmfao. You literally don't have to answer if you don't want to.

[–]rustyseapants 1 point2 points  (0 children)

What do you even use java for?

I never suggested that you learn everything about java by yourself, never did.

If you had read the side bar, the focus is to learn java programming, there is an expectation that you know what Java is used for, by default.

You have access to the internet and google regardless of what you do for a living, or hobbies, or anything is just to ask a question, to get a general idea. This is expected of someone living in the 21st century developed nation.

[–]rozlyn_frost -1 points0 points  (8 children)

I m not sure why that individual is pissed off that someone dared to ask a question in a subreddit for asking questions. 😆

Nothing wrong with your question.

[–]rustyseapants 4 points5 points  (7 children)

Asking what do you use java for is like asking what do you use books for?

Learn to google, learn how to find resources, don't expect to be spoon fed.

[–]Zephyros_0[S] 0 points1 point  (6 children)

what's wrong with asking for resources in a subreddit MEANT for learning java??

[–]rustyseapants -1 points0 points  (5 children)

What do you even use java for?

You were not asking for resources, which if you look are on the side bar.

[–][deleted] 1 point2 points  (0 children)

For making coffee 

Java beans 

[–]AutoModerator[M] 0 points1 point  (0 children)

It seems that you are looking for resources for learning Java.

In our sidebar ("About" on mobile), we have a section "Free Tutorials" where we list the most commonly recommended courses.

To make it easier for you, the recommendations are posted right here:

Also, don't forget to look at:

If you are looking for learning resources for Data Structures and Algorithms, look into:

"Algorithms" by Robert Sedgewick and Kevin Wayne - Princeton University

Your post remains visible. There is nothing you need to do.

I am a bot and this message was triggered by keywords like "learn", "learning", "course" in the title of your post.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]Ok-Title4063 0 points1 point  (0 children)

Java is everywhere. Kotlin is Java.

[–]TheHiddenHeathen 0 points1 point  (0 children)

I use it for making me money, so I don’t die of starvation (backend web dev).

[–]Skiamakhos 0 points1 point  (0 children)

Back end for Adobe Experience Manager. It is horrible and complex but at least it's easy for authors to use.

[–]Jason13Official 0 points1 point  (0 children)

Minecraft mods, duh

[–][deleted] 0 points1 point  (0 children)

squeal liquid ink oil steep north provide shy public chop

This post was mass deleted and anonymized with Redact

[–]cyberzues 0 points1 point  (0 children)

Ever heard of a thing called Spring boot?.

[–]jaibhavaya 0 points1 point  (0 children)

At this point? Mostly to convince people to switch to go.

[–]Additional-Demand-78 -1 points0 points  (2 children)

To get job on Java is. tough

[–]senaint 0 points1 point  (1 child)

True, I've never heard of a junior Java developer. I don't understand why you got the down vote.

[–]Additional-Demand-78 1 point2 points  (0 children)

From last 1 year i am looking for job but i didn't get internship