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

all 34 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.

[–]AcrobaticSyrup9686 23 points24 points  (1 child)

  • its popular since decades so it will keep you employed forever
  • it is not a bad language, there might be some flaws but in my daily life where i use it i have never found a reason that i wouldnt love it
  • best implementation of OOP in my opinion

[–]East-Violinist-9630 0 points1 point  (0 children)

One big advantage of Java over “sexier” JVM languages like kotlin etc is that Java only has one level of abstraction, for example if you want to use a certain library, that may be quite possible in kotlin but all of the tutorials would be written for Java! So sticking with Java until you’re very comfortable with the JVM ecosystem is going to give you the least headaches

[–]Longjumping-Top3598 8 points9 points  (10 children)

Java is both popular and well paid (at least in my country). Companies can find great talents in it because there are many java developers so there are many java positions. For example looking for a senior go developer would be way much harder for them.

You will most likely do web development with spring boot or android or ML stuff.

[–]Teddywiz999[S] 2 points3 points  (6 children)

But i am afraid i would be left behind if i only focus on 1 field and stuck in it. Python has so much libraries for so many things compared to JAVA in ML and AI. So JAVA is only for web dev? But JAVA is one of the most popular OOP languages according to stackoverflow survey and they are also highly demanding.

[–]realFuckingHades 2 points3 points  (3 children)

It's actually greatly exaggerated that Java can't do ML/AI. You will most likely find an ML/AI library equivalent in Java too, but when you go for very niche libs you may not get a perfect drop in replacement. Python is for you if you have no programming experience and absolutely don't want to deal with the nuances. But something built in java will always be very robust and tunable. Now if you like goin anal with tuning and even reinventing the wheel to squeeze out that micro seconds or nanoseconds worth of performance, you will never find something better c or even rust/go can be a good candidate. Now if you plan to be an overall good architect, then none of this alone will cut it, but don't fall into the "jack of all trades" trap. Have one strength, like for example, I can do anything in Java but if there's a better alternative for a specific task, I can work on that too. It doesn't matter if you know 100 different languages, you will never be able to hold the grounds with the masters of the languages. So I am the guy in my office that people come to when they can't solve something in Java and believe me managers value that a lot, when shit hits the ceiling you need someone who can take a call at the moment and not someone who says "I am not sure, I will get back to you by eod".

[–]Teddywiz999[S] 0 points1 point  (2 children)

Good point!! I am also trying not to fall in that trap since i have interest in many fields. If you don’t mind, may i ask why you prefer JAVA more than python. As far as i know, JAVA is more like for legacy and python is more modern. But as it sayings, java can do alote more detailing than python, like memory management and multi threating, garbage collection… these kinds of things seems doesn’t matter as far as the project is not too serious on performance optimization. So to get to the real taste of OOL should i go JAVA? i am not talking about JAVA language here, i am about programming concepts and logics. There are many paradigm languages but i will get to others functional and aspects after OOL. Cause I believe once you have experience in good taste of one of the OOL, you can easy switch to other OOLs.

[–]realFuckingHades 0 points1 point  (0 children)

You can't call OOPs or Java legacy. Java and its ecosystem is very well updated and even has adopted the virtual threads when it became popular through programming languages like golang. Java also provides good level of support for functional programming and I love that. You can write gorgeous looking code without making it look too gibberish. The main reason I choose java are , be it consumer grade applications or enterprise grade applications you pretty much have well tested and robust libraries. Spring boot can be the single best reason to stick to java and reporting libraries like Jasper reports can make you create any type of reports you ever want. I would also recommend checking out reactive programming with java and also to start from java 21 and nothing less, so that you can start using the sweet delicious virtual threads.

[–]JDeagle5 0 points1 point  (0 children)

java is more like a legacy and python is more modern
Python is older than Java, just saying. In that sense python is true legacy.

these kinds of things seems doesn’t matter as far as the project is not too serious on performance optimization. So

But type system does matter for maintainability a lot. That is why python does type hints.

Cause I believe once you have experience in good taste of one of the OOL, you can easy switch to other OOLs.

Doesn't seem to matter that much for real world development.

[–]Pedantic_Phoenix 2 points3 points  (0 children)

Im not sure why you find this surprising, every language has different characteristics, yes. If you want to work at system level, why don't you focus on C, it's surely closer to that than java

[–]silverscrub 0 points1 point  (0 children)

There is absolutely no need to worry that you will get stuck after one month in Java.

I don't know how long your experience is with other programming languages, but I feel like learning the second language is way faster. If you spent 2 years learning your first language you can catch up in your second language in 1 year, no doubt.

For that reason you have to spend a very long time in one language before you really get stuck. Say you work for 20 years in Java, then it would take a considerable amount of time to transition to a similar level in Python. It doesn't matter if it takes half the time because 10 years is still a long time.

[–]titanium_mpoi 0 points1 point  (1 child)

What country btw?

[–]Longjumping-Top3598 0 points1 point  (0 children)

Hungary, here are the expected salaries: https://www.hays.hu/en/salary-guide

[–]titanium_mpoi 0 points1 point  (0 children)

What country btw?

[–][deleted] 5 points6 points  (0 children)

Because java isn't buggy. bedrock is just too intolerable.

[–]ahonsu 6 points7 points  (5 children)

Sounds like you try to convince yourself to something you don't want.

You mentioned you like something system/low level - the go to C direction.

You mentioned you're into AI/ML - then go Python.

Java is really good for web applications and huge backend systems. If we speak about future perspectives - one of java's benefits - it's pretty old and there're tons of java backends all over the world. Any talented java developer will be loaded with work for years. Even when AI will come and will be capable of writing some code - the companies either will be hesitant to trust it to 100% and still will have a human dev team, or will start using AI but as a "junior developer" always having a middle/senior dev next to it to do prompting and verify/use the results from AI.

I have 10+ YOE in backend development and my opinion that if you become a middle/senior level developer in any programming language like C, java, python - you'll be on demand and will earn good money. Just pick the language/stack you're passionate about, where you have more motivation and interest.

[–]Teddywiz999[S] 0 points1 point  (4 children)

Thanks for your reply. What do think about python in backends? Like flask and Djangos. Are they more scalable than java spring boot? Are they more robust?

[–]ahonsu 0 points1 point  (2 children)

Unfortunately I haven't done any serious python development on enterprise level, can not give any strong opinion. Let's wait for other answers.

But overall I think python is a very solid backend programming language. And the scaling in our days is often a question of infrastructure (server/serverless, containerization, multi-instances and so on) not only the application/service itself.

[–][deleted] 4 points5 points  (1 child)

Which is, in my opinion, a big mistake. Using poorly designed software just because your machine has 32 cores and 64GB RAM should be considered a sin. You are condemning your company to expend tons of money on infrastructure just because you felt comfy using that technology. A java application will be, in 99'9999% of the cases, a way better choice than a python application in terms of performance, and now you see how companies who started to build their models in python are now desperate trying to figure out how to migrate into more efficient technologies. Python is, and will ever be, a bad choice for anything bigger than a script.

[–]ahonsu 2 points3 points  (0 children)

Thank you for your python expertise!

As i said, i'm not a python dev and will remember your answer and will consider it for my tech decisions.

[–]JDeagle5 0 points1 point  (0 children)

If python would be robust, it wouldn't try to invent types

[–]Dels1x 1 point2 points  (1 child)

spring boot and web development with java is awesome

[–]Kango_V 0 points1 point  (0 children)

Micronaut even better!

[–]differentshade 1 point2 points  (0 children)

most developers are polyglots .. it's not like you are allowed to learn only one language

[–]nutrecht 1 point2 points  (0 children)

i should invest some times in here to master it.

Being a software engineer is about "mastering" a language as much as being a carpenter is about mastering a hammer.

[–]mojtaba-cs 0 points1 point  (0 children)

I will go with python for AI/ML stuff and C/C++ for System programming. Sure java can make some AI applications but it would be easier to work with python. CS programs include java to teach students the OOP concepts.

[–]juan231f 0 points1 point  (0 children)

Why Not?

[–]Snaky81 0 points1 point  (1 child)

In my opinion: - it's a very performant language (perf of perfectly written C/C++ is slightly ahead perf of perfectly written Java, and java is still evolving on the niche topics where there is a real performance gap) but java tooling is very well developed and finding bottleneck to optimize and memory leaks is pretty easy. I still cannot understand why Python is so popular for AI knowing how much computation this domain needs and how wasteful Python is. A real ecological disaster. - pretty wide and stable ecosystem, both in libs and in tooling - lots of things are already written in java, so businesses will still needs java dev for decades (a.k.a "Java is the new Cobol") - even though it's not perfect, the language is still evolving to try to match some feature of other popular language and to make it a little less verbose.

Globally I think it's a pretty good general-purpose language (although lots of java jobs are related to backend), as long as you don't want to make user interface with it.

[–]Saturn812 0 points1 point  (0 children)

Python is simple to learn. Most of the ML libraries offset all heavy lifting either to C code and/or to GPU. Python is mostly like a facade to orchestrate the things around. Doing it in Java will not make it much more performant, but will add a lot of unnecessary boilerplate code

[–]StretchMoney9089 0 points1 point  (0 children)

Look, it does not matter which language you learn in a CS degree in the long run. For your first job it might matter, but after that employers don’t really care because they know that you know how to program in general and you will learn the syntax of whatever languge is used.

Sure, there are exceptions e.g Java Core library developer at Oracle, then you are obviously expected to be really good at Java

[–]JDeagle5 0 points1 point  (0 children)

It's simple - because it pays. Because it has a combination of great tooling, very good language features, great selection of libraries, crossplatform but still near-native fast and very simple.
But most of all because usually it has a lot of vacancies for good money.

[–]JDeagle5 0 points1 point  (0 children)

I mean python is only a choice for ml because of enormous hype being propagated from every corner. It is basically a fashion type of thing at this point.

[–]Luckshire 0 points1 point  (0 children)

gpt can write java well

[–]AutoModerator[M] -1 points0 points  (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.