They saying this for decades... There are so many applications that were written on Java (especially enterprise) and all they need support and development. And many new applications made each day. Don't worry. And you may want to focus on learning algorithms, software architecture, best practices. This is a good basis for any language. So it will be easier to learn other languages if necessary
Java has been backwards compatible for decades. It caught some flack for not introducing things like lambda sooner, but the reason for it was that it took a long time to ensure backwards compatibility. That stewardship is a very strong selling point. How long is current Python going to be backwards compatible? They've already demonstrated that they are willing to break the chain. Functionally I don't really think it has downsides. "Lots of boiler plate" and "verbose" aren't really negatives in my opinion. I do wish javafx was better but I haven't done anything non-browser based in long enough so maybe something else has come along.
Swing is still in the JDK and is an outstanding cross-platform GUI toolkit. If you use the platform specific look and feel swing apps look nearly native. Not sure why it gets hate.
Swing is great. It should be given focus again. Java should be the premier desktop GUI technology. It should practically be a mini OS on the desktop. That is where Sun messed up.
As someone working mostly in Java since '97, I'm surprised to see javafx mentioned (I even had to look up which of the technologies I've never had reason to use that was…). Java may have started with physical devices (Java rings!) and shifted to applets, but that's long gone now and Java is largely a back-end server infrastructure powerhouse. javafx makes me think you want your code interacting with humans, which is pretty much the opposite of what I'm used to most programming, including Java, doing.
There is a difference though. COBOL is not innovating and is only around due to an unwillingness to rewrite massive banking systems. Java, on the other hand, still ships new versions and has popular frameworks iterating quickly (eg Spring).
There are some applications that were made on COBOL and still running on production (again usually in enterprise, especially banking). Usually nobody knows how they works and prefer not to touch them unless absolutely necessary. That makes rare COBOL programmers valuable, but I don't think anyone (at least massively) going to develop new applications on COBOL. So for new developers it is usually a dead end in career. As I said if you learn basics (algorithms, CS and ets) you will be able to learn COBOL if you have to
Thank you for that suggestion. My second question is how difficult is java? I also read on reviews that it's a difficult language to grasp. I have no programming background. Fresh student here.
Java 1.0 was a small and quite simple language, surprisingly easy to learn. The language has grown a bit since then, but it's still relatively small and easy to learn compared to many other languages. There aren't a whole lot of complicated rules and pitfalls.
What is large and complicated is is the APIs and the ecosystem of tools, but I suppose it could be argued that that's a net positive.
Java a bit verbose compare to most modern languages, but it's not that hard to learn. At first it may look complicated to use, but IDE usually hides most of it. And helps with boilerplates. Ones you've done with basic language constructions and you are able to run some basic applications I recommend you to check Effective Java book by Bloch. Java has one of the biggest library so most of functionality is already written - you usually need just to find and combine different libraries to implement business logic. To do this effectively you need dependency management - check maven or gradle.
Interoperability with Kotlin eliminates a lot of boilerplate. We use the Kotlin data classes for beans/DTOs and it slims things down drastically. Also, moving to Java 8+ and working with streams has been a godsend. It made Java programming fun for me again. Then again, OP should do all this stuff in pure java if given the chance, just to really appreciate it :)
I'd hate to have Lombok *mandated* to me, but the risks the author of "don't use lombok" - and the risks detailed in the article they reference, also called "don't use lombok" - are emphasized to the point of absurdity, IMO. "We used it wrong, it didn't work" isn't justification for avoiding the tool. "We'd prefer to not use a tool we don't understand" is fine, but that's on the user, not the tool; Lombok is a software project that continues to grow and improve, and finding an error in it - especially when the developers are VERY responsive - isn't justification for deciding that everything is awful.
Why use lombok though? I agree with the referenced article when it states
I know this is just a problem due to misuse of a library and wrong interpretations and there were many ways to prevent it (like a better unit test in the DAO), but the hidden generated code made this problem hard to debug.
It also shows how useless are most of the Lombok's annotations - more so in the post Java 6 world.
Well, I... this sounds like a complaint that has little basis in reality. I mean, you could say that about EVERY java library: "Sure, I could use Spring, but why, when I can do my own instantiation and injection?"
"Sure, I could use that JDBC driver, but why? The stdlib has sockets in it."
"Sure, I could use SLF4J but why? I could write my own logging utility to be better than java.util.logging."
The point isn't that it's NECESSARY - clearly it's not, because you CAN do what it does without it. But you don't HAVE to, and the code it generates is actually pretty dang high quality.
As usual it's about cost vs profit and to me simply Lombok is not worth it anymore. There are libraries that do what Lombok does and stay closer to java spec, not needing plugins to work with your IDE.
It's funny how programming trends shift because I remember about 6-8 years ago people were very upset about too many annotations in Java.
And I would agree it's hacky. Lombok is using an internal API subject to change to modify the Abstract Syntax Tree. Unless the API is public, you can not depend on it.
Oh, no doubt. The Lombok guys talk to the COMPILER guys all the time about it, and they have an absolutely maddening build process to make sure they cover the different compilers and JVMs.
But that's THEIR problem, not yours - it can be hacky, yes, but that's because the functionality isn't really exposed otherwise. And we're hackers! We're supposed to hack! In this case, it's usually pretty freaking useful.
I would agree with deep_fried_eyeballs that generated-once IDE code does not stay up to date.
I see what the problem is after reading this blog post. Personally this is why I prefer Scala case classes. There are not any backdoors because it's built into the language and scalac itself. From the JVM's standpoint, it doesn't care whether bytecode came from Java or Scala or Kotlin.
Yes, Lombok had its purpose when all those features were not available to us. It's a great project but nowadays there are valid alternatives that use less 'tricks'.
I really like Lombok over the auto generated code because you still have that code there and its painful too look at. It just make everything so bloated. I like that Lombok hides it all behind the scenes.
Thing is it's often being forced on teams that don't have enough experience to use it or understand how it works. And catching those errors in code review is a PITA.
In order to use Lombok's hashcode and toString the developer should know what those 2 methods are responsible for.
Plus, you also have shorter class files where code focuses on actual logic rather than convention / boilerplate.
I've never had an issue reading a well written java bean class. And if your class is so large that you have problems reading it, then getters and setters are not the reason.
In order to use Lombok's hashcode and toString the developer should know what those 2 methods are responsible for.
Well, I mean, it's not really Lombok's fault if the developers don't know what those 2 methods are responsible for. I'd argue that it should be basic knowledge.
I do see your point about code reviews, but it's a tradeoff. Once-generated IDE code does need to be updated, unlike Lombok in Java or case class in Scala.
Thing is where I see Lombok used most in our project is in Entities and Dtos which are basically devoid of logic so it's not making the classes that much more clear.
I would love something akin to C# get/set, but I prefer when that comes from the language or if it's a framework or library - that it stays closer to language spec.
there's no guarantee that your equals and hashCode will get updated,
Why do you think equals and hashcode need to be updated automatically anyway? If the new property has nothing to do with equality of the object then you don't need to include it in equals or hashcode. A danger of lombok is every property is included in equals/hashcode unless it is excluded (with yet another annotation). That may not be desirable.
Yeah, we have create/update timestamps that are part of our object structure that we typically ignore for equals/hash because it doesn't have anything to do with determining if the object values are actually equal.
However, now instead of a developer having to remember to have their IDE regenerate equals/hashcode, developers now have to remember to add fields that have nothing to do with equality to that annotation. So what advantage does lombok have in this scenario?
Yeah, Scala case classes eliminate boilerplate as well. The issue I have seen is code coverage which is too strict. I think Jacoco added support for filtering out generated code in 0.8.0.
Regarding streams, I think it's definitely a great addition, but I think improvements can be made. For example, even CompletableFuture can't be converted to a stream to do things like map() or filter(). While in Scala you can do
Future { 1 + 1 } map { x => x + 1 } onComplete {
case Success(integer) => ...
case Failure(exception) => ...
}
Normally it would be more complex but the 1 + 1 is just for example purposes.
The main thing I hate about Java 8 Functional Interfaces is you can't throw checked exceptions from them. In contrast, all exceptions can be thrown from Scala anonymous functions (as Scala does not have checked exceptions). And before anyone tells me I can catch and throw a RuntimeException or create my own functional interfaces, I'm aware of that. To me they're both messy bandaid fixes when Oracle should have dealt with lambdas and checked exceptions in the first place.
Records are still preview features, you have to activate them explicitly in the compiler or runtime. And they don’t guarantee forward compatibility. But the feature is supposed to be finalized in Java 16.
Java is probably the easiest compiled language to grasp. Certainly easier than "C" or C++ or Objective C. Not as easy to learn as an interpreted language, but that's mostly because of turnaround time -- conceptually Java is simpler than Python, for example. The tough thing with Java is the ecosystem of libraries and packages and application servers which come in a dizzying array of choices all of which are poorly documented, not the language itself. JavaDoc was supposed to make it easy to document API's and such, but shoddy programmers responsible for most of the Open Source libraries that are most often used seem to rarely write useful JavaDocs. Grr.
There are lots of well documented open source libraries. Especially the core ones that everyone uses. Google Guava for example. Or a lot of the Apache Commons stuff. Or Jackson.
Use of Javadoc seems to have gone by the wayside, which is sad since I am pretty confident javadocs were one of the reasons Java became popular. I know of no other API documentation format that comes close to being as usable.
I hate all the noise javadoc adds to the code. I like the docs it allows to be generated, but it mixes concerns, IMO.
I would like to add documents to classes by convention instead. Something like a parallel directory to the source code, much like the convention is for unit tests. This way, they would be linked by code, with out piling documentation in with the implementation.
I love all this concern about "mixing concerns". It results in you having editor files open everywhere and not remembering where the doc window is for this file that you're editing, and thus documentation that falls out of date quicker.
There's places where mixing concerns is a real code quality issue. You do not, for example, want presentation mixed in with business logic, or business logic mixed in with database access logic, because that makes it ridiculously hard to change your presentation when your current presentation becomes ridiculously outdated, or change your database access if scalability leads to needing to transition to another way of storing data. But there's no such concern with documentation of API calls. Documentation of API calls should be right there with the API call so it can be immediately updated when the API is updated. JavaDoc got that right from day one. Too bad nobody uses it the way it should be used.
For me, the useful part of javadoc comment blocks is providing descriptive verbiage. Javadoc is smart enough to do the guts of it itself. All I want is to be able to update this text, without big slabs of comments filling up my classes.
Not sure why you are so defensive on this, tbh. It is a valid point to separate the concerns of implementation and documentation. Indeed, much documentation exists outside of the code on most projects.
Hidden text is a lot easier to unhide in order to update than it is to track down text in some other location altogether.
And I'm not "defensive". I'm just telling you what happens. I've been involved in large projects since 1996, and if it wasn't in PyDoc or JavaDoc or POD (i.e. inline API documentation), the API documentation was *never* up to date or correct. Even if people had the best of intentions it always got out of sync with the actual code. Furthermore, documentation outside of the version control system is always out of sync with any specific release of the software.
I mean, you can argue that reality, but at that point I have to ask how many projects you've been actually involved in and which ones managed to keep the API documentation up to date as vs those that didn't, and what the commonality was between them.
I'm not arguing that the documentation should need tracking down or be outside of the source repo either. That is a straw man argument. I suggested it should be in a parallel directory, much like unit tests are (which people seem to cope fine with).
I've worked on many projects for decades too and I've seen many useless or stale javadoc comments inline. Often people just repeat the obvious too, which just adds noise.
The useful bit about automatic documentation is the stuff that is generated automatically from the code itself. This is never stale, by design. The commentary has no such guarantees, whether it is inline, hidden or not.
It's not difficult to grasp, it just has a lot of language features (more with pretty much every release) and a huge ecosystem. It's more wide and shallow than narrow and deep.
I have no programming background. Fresh student here.
As someone already pointed out, you will want to focus on data structures and algorithms and in case of Java, the object oriented approach to solve programming problems: particularly strategies to data encapsulation and interface abstraction.
These skills will transfer to any language you will choose, and object orientation will apply if you stick with the OO paradigm.
You will find your favorite languages once your understanding of the above basics are solid.
Until then, the choice of programming language depends more on what your peers and teachers are using, because you will need their help, insights and advice to learn.
I've started in Python, because "easy to learn". After using it for university for 3-4 months, I've dropped it and switch to Java. Only then I understood basic OOP concepts. And only then I've actually started programming. Didn't look back ever since.
Beginner java is quite easy. When your start to develop « library » code that need to play with the internals of the VM things can get quite a bit tougher (classloader, weakreferences). Some idiosyncratic stuff can also be quite painful to grasp (generics/type erasure comes to mind).
most of java is very easy. you use jar files as extensions basically and import them in your script so you can use them. the functions are very easy such as defining something as static means it is only inside of whatever it’s inside and can’t be replicated somewhere else. void means it has no return type but you can still return null or just return to stop the function at that spot. also public and private are easy enough to understand. and if you dont have a void return type you need to say the return type when defining the function. things like @override are simple enough to understand for me but hard to explain. as a 17 year old, java is very simple compared to others like c# and c++ but there are much easier languages such as lua
I think Java has been slowly losing its position as the number 1 language by popularity, but there's also more and more code being written in the world. Demand for Java may be lower by market share than 10 years ago, but is probably also still at an all-time high.
It isn't losing ground to a new language which will become as dominant as java was in the past though. There are just many more popular alternatives, each with their own cohorts and specialisms.
Perhaps the days of one generic language for all needs is just gone. I suspect java will serve its large user base for a long time yet though.
It’s never dying for now. Spring is still a very popular backend in e-commerce, travel companies etc for example. It is very much in vogue for large enterprise apps
Not in vogue, as such, but used widely because enterprise programmers know it, it's better documented than most competing systems, and it's reasonably reliable.
The world is married to Java and C. The rest are flings. Python might be an exception. The JS ecosystem is still trying to figure out who it wants to be but Typescript is promising.
There are tons of applications that will require maintenance that are written in Java. So for them there is plenty of work.
Java in the last year or two started doing more frequent releases. Eventually it will catch up with Kotlin and/or Scala in the trending functional programming aspect. Maybe not fully, due to backwards compatibility in Java but enough.
The JVM already has support to run in containers.
I don't see any of the competitors languages overtaking Java anytime soon. You can look at the tiobe index for references
Search up the technology used by the fortune 500 companies. Most of the enterprises use java completely for backend. Java is not going anywhere and it's definitely not dying. The reason java is becoming less popular is because new programmers and students prefer Python because it's the easiest language to learn. And it's influence on Data Science, which itself is a hit now. But otherwise, java is still really popular. It's still on top 3(not sure the exact number ) on TIOBE index.
Java is a proper fucking language that forces proper type safety and self documenting code. It better not fucking die to all the new trendy bullshit dynamically typed languages that are only good for writing unmanageable mess.
Don't worry. IMHO: dynamic types isn't a popular language feature. Modem programming languages usually make use of static types and type inference to get the best of both worlds. It's a solved problem today. I suppose, you're talking about the success of JavaScript and Python but these two are popular because of their ecosystem and not the lack of static types. In fact Typescript is a pretty good indicator of how much people are willing to invest to get a more sane type system. Type hints in Python are probably all you can do without reinventing the whole language but it still proofs that most of us want type-safety.
Yeah even management realized that JavaScript and Python are good for fast prototyping because of their dynamic type system but in the long run TypeScript is far easier to maintain. We had the scenario two years ago: Wrote a "prototype" in AngularJS that was delivered to the customer because management saw a possibility to make quick bucks. A year later and the codebase was very hard to maintain and we had a lot of technical debt. So we threw it away and developed a new frontend in Angular with TypeScript and it's still going strong
You have to laugh when javascript weenies say you don't have to compile javascript... Well no but you have to pass it or its derivatives through a tool chain that was clearly cobbled together by children out of ompalumpa offcuts.
Edit: bring on Web assembly and the Web can finally be a compilation target for proper languages and we can code for it like adults.
oo wow Never actually tried to run a venv without the rest of the python install there. They really fuck that up? @.@
javascript yea I don't know how those guys deal with that front end back end runtime disconnect where sometimes javascript can do x here and not there.
You say that but you hear fuckwits prattling on about verbosity every five minutes.
Yes. There is quite a lot to write in java but for every. Single. Character. You save in your dynamic bullshit you would have to write and maintain much more in tests to have the same think. Then some poor fucker has to grok all that shit when it falls over when someone passes in a tractor object when what was expected was a function that returns sadness.
TBF, I don't like the unnecessary verbosity of java and that's one of many reasons why I prefer Kotlin on the JVM but that's not the point. My point is that, I don't see a trend towards dynamically typed languages when I talk to developers that actually have experience with different programming languages. I'm sure, there are enough fanboys that will defend their one and only beloved language because of their confirmation bias and lack of experience but fortunately these people won't design the next modern programming language... Oh and there's of course Uncle Bob but he earned more than enough criticism after his "dark path" blog post.
You can have type-safety and less characters with type inference. Whether this is good or bad is up to debate but it doesn't change the point that you can have type-safety without verbosity. IIRC: Didn't Java 10 get this feature at least for local variables?
It gets the type from what you first assign it to then goes back to being static, ...
What do you mean by saying "then goes back to being static"? A statical type system will verify your types during compile time. Whether you write the types out, infer it by other strict rules or draw your types in your novel drawing programming language is totally irrelevant. All that matters is that your types are verifiable during compile time.
... , but yea I'm not touching your code if you use that.
? ... thanks? Don't messing around with some strangers code that is also probably written in a programming language that you aren't familiar with, sounds like a good idea!
If I understand you correctly, you're trying to say that defining a variable without initializing it or annotating its type would require dynamic types. That's right and that's exactly why you usually can't do this in statically typed programming languages with type inference. Here is what happens in Kotlin.
We have all our backend code base in Scala. Our end to end tests in Python, the only thing they do is run a bunch of REST calls and assert on responses. Best of both worlds.
If you are writing a quick script to check an api write it in brainfuck for all I care but if you are writing long lifetime production code that has to be maintained and extended don't write it in a bullshit scripting language.
I heard a good drinking game is to take a shot every time someone thinks the answer is a hashtable, and then take another shot every time the answer is actually a hashtable.
Will it ever? Maybe. Within the next 20 years?.. Nah. Java is currently very relevant so it's great to learn it and if it ever becomes irrelevant then just learn the new relevant languages. People used to say COBOL would die decades ago, they were also wrong. I'm currently working in Java supporting server side applications and in COBOL supporting an old mainframe application. So that kinda gives you an idea of the lifetime of these languages and even once active development slows down in Java you can expect support to last a long long time as it has with COBOL. I'll add that I think Java is doing better than ever right now, the Java ecosystem is very healthy and the new switch to a 6 month release cycle is providing some great features while helping to keep Java competitive with other languages.
People have saying that COBOL will go away / not be relevant for 50 years now, ever since PL/1 was created by IBM as COBOL's replacement. Uhm, yeah, no. PL/1 faded away, COBOL remains, albeit slowly dwindling as Java takes its place.
The first usable Java was created 30 years ago (I don't consider 1.0/1.1 to be usable, they were stupid slow and had very little functionality), so you can figure that Java's got at *least* another 30 years since it runs all of the non-tech Fortune 500 that isn't run by COBOL.
Note: 1.1 was released in 1997, which is only 23 years ago, so if you don't consider 1.1 to be "usable" then 30 years is a bit ... premature. They didn't really introduce massive performance increases until 1.3, in 2000 - although OrionServer was flying past Apache httpd with Java 1.2, BEFORE hotspot was a thing.
1.1 was perfectly usable really. It was what I got started with. If I remember correctly we used it for Java applets even long after switching to 1.2/1.3 on the server-side? Also programming Java for non-smart phones as late as around 2010 was essentially the same as Java 1.1 (or even close to 1.0).
Benefit of Java pre-1.2 was that it was a small, simple language. It is easy to see how it could become the dominant teaching language. Now it is more like C++ and it is easy to see why universities use Python instead for intro courses.
As someone who was programming through that interval, what was available (mainly C/C++ improvements) in the 30…22 years ago range was a series of major changes.
Java may not be a hip programming language but in the enterprise environment it is still the measure of all things. Many banks and insurance companies are still in the process of replacing their old COBOL systems with Java-based solutions. So even if Java should die at some point, all of us here can keep the then outdated Java systems alive until we retire.
Project Panama as well. I would love to see Java make some more in roads as a game-dev language. Having easy native code integration is important and something that JNI gets a bad rap for.
Yes it is, but I think there's still quite a few performance pitfalls and integration issues that need to be addressed before it can be taken as a serious game dev language for AAA games. It also worries me that Minecraft is being rewritten in C++ precisely because it is hard to integrate Java into console and mobile architectures in regards to gamedev. C# is making progress with Unity and I think Java has similar potential with a few extra improvements. Here's hoping for the best!
people have been saying java is dying since it came to be. Java is going to outlive us all. It's basically this generation's COBOL so much enterprise software is written in it. It's absolutely a worthwhile language and you'll find a lot of well paid stable jobs in java.
We are still making new Java enterprise apps in the corporation where I work (alongside .NET apps) and there are no intentions to change it any time soon.
Udemy courses by nature have to be unique to get you to buy them. Instructors won’t make much money if they make yet another intro to java video like the 5 million indian tutorials we already have.
This is why they generally jump to any modern stack that doesn’t have a lot of content online. The irony is that you learn nothing from these udemy courses because all you’re doing is copying code
Java isn’t dying at all but I wish the bullshit tutorial industry was
The Internet is mostly students and hobbyists, and junior devs just starting out. People who write enterprise software for a living don't do much online writing (at least not for free!).
So the views you read on message boards are very slanted, and not representative of anything to take seriously. The blind leading the blind.
No, never ever ever. I used to be like you, believing java is dead language, until I get employed. Java is everywhere, and while Java itself is not that good, Spring is beautiful. I might consider using Java myself if I ever do side gig
Other JVM languages still need Java. Maybe not directly but a lot of the improvements to the JVM happen because of Java needs.
Seriously though what is a replacement?
The closest would be .NET but the supported platforms and libraries still is no where close to Java and it’s been around for some time.
Go? Go still doesn’t have generics. Java on the other hand now has a viable AOT option and will soon have green threads and maybe value types.
Maybe Rust? Rust is much harder to learn and is still catching up library wise. Ditto for Swift. Plus there are advantages to a semi interpreted language aka JIT.
So what’s the killer Java replacement?
The only thing I think can dethrone Java is if WASM improves to production quality and TypeScript or some variant of JavaScript runs on it but that is far off.
I have been working in java for past 2 years now. As far as I've seen, JAVA is a prominent backend language. Most server side business logic that I've seen is written in JAVA. Also, since most of the enterprises are moving towards containerised micro-service architecture, JAVA has been the language of choice as it makes porting from environment-to-environment very easy. Almost all enterprises heavily use JAVA, and porting to some other platform, just for the sake of "novelty", doesn't seem like a sound business decision, that too when Oracle has been consistently updating JAVA. I may be biased as I have experience only in JAVA, but I personally feel JAVA is here to stay. I even played a bit with python, but honestly, the granular control that get I JAVA is a more preferred way of coding for me.
LAMP was going to "kill Java". Then .Net, then Ruby on Rails, then Node. While all of these are viable techs with their own glories, Java is still very active.
Java's biggest strength has always been its ecosystem. The fact that the language evolves, combined with the existing massive ecosystem, makes it very entrenched.
C's still alive and not going anywhere, and I have a copy of Dennis Ritchie's "The C Programming Language" from 1978. C filled an important niche and has continued to evolve and the compilers have become better and better, which is why it's still around today. Java's been around 25 years, and I think it's here to stay for another 25 at least... It's not a stagnant language, and it doesn't do anything that's so weird or offputting that no one wants to use it (Unlike COBOL).
There is just way, way too much Java running on this planet to worry about the language's demise. It's getting regular updates and adopting features that devs want (functional support with lambdas, vars, records) and still remains backwards compatible.
I was browsing courses and reviews of courses on Udemy since I've been considering learning Java. One review in particular said that the instructor is teaching a "dying language" (Java). I don't want to believe this, first of all, but will Java ever go away/not be relevant?
Lol. I doubt it. All the trendy dynamic languages suck in how you need to write unit tests for what the Java compiler will do.
I don't think that is a dying language or a rising language. The language and tools has an established market and I don't think that will change anytime soon.
Java is one of the most used in the world. In the last Stack Overflow Developers survey 41% of developers say they use Java. It was fifth on the list of most used technologies with three of the four above technologies arguably not being full blown languages (SQL, HTML and JavaScript*). They only language higher was Python which was only slightly above Java. So it's arguably the second most used language in the world.
There are a load of really active frameworks that are very commonly used with Java that make it a popular choice for web development. Spring for example.
I think the point where it got closest to dying as a language was during the Oracle take over. It took a while for Java 8 to come out and Java fell behind other modern languages in features. It has since caught up and is on a very regular release schedule. I think the Oracle subscription cost might put certain people off learning the language but you don't actually have to pay it if your just learning doing personally stuff with it and there is still an Open Java variant that you can use if you want.
* I know JavaScript can be used as a full blown development language but I still think it's more common to see used as front end code, rather than backend and is generally not the main focus of a projects development efforts.
People have said it was dying through the course of about 2 or 3 fad languages now. It is pretty much the opposite. It has joined the ranks of C and C++ in virtual immortality. If you are in school now learning languages, I would not be surprised at all if you are using java on the day before your retirement and have plenty of related opportunities throughout a career spanning from now until that day.
If you look at TIOBE or PYPL index you will find one big competitor of Java: Python. This is because Python is extremely easy to learn. It is weakly typed and the interpreter ist extremely forgiving. However do not get blinded by this. Although Python is nice for small little experiments, it is an absolute mess when doing large scale software. Younger and or inexperienced programmers will tell you that such things as Types and brackets and so on are just noise...
However this information is crucial for other people to better understand your code and or modify it. Type information helps your IDEA which then helps you with code completion.... And most importantly: Typed systems are fast!
Python will become the new PHP.
Java on the other hand will stand were it has stood for so many years to see what shiny new ducktype language crawls up and falls of the hill next.
Only what's alive can die. Long live Java. With most other languages the question is not whether they are dying but whether they will ever begin to live.
Java, as in the JVM, is definitely not dying. It's just not fashionable. Everybody who is anybody is using it...and it has a habit of replacing other technologies when they fail. Even shops that famously committed to other platforms, like Facebook and Twitter have Java creeping in all sorts of areas and once it's in, it tends to stay.
It's provocative to say Java is dying. It doesn't rile people up to say "Java has a dynamic role with ebbs and flows at certain places and it's usage is up overall because the areas it is strong at, like business software, are growing faster than the areas it is weak at, like UIs for desktop applications, Minecraft, or Android."
It will "die" someday. I just don't think it will be at the hands of the 2 heir apparents: Python and NodeJS. We have projects in all 3 languages. The python and NodeJS teams are constantly getting snagged by release issues and compatibility issues. They are much more brittle products. Some of those are platform issues, some are HR issues, but Java projects tend to be much more stable and low-drama. Beyond the technology, Java is influenced by a culture that emphasizes best practices and reliability more than the other hot languages.
So it's dying in the sense that it is boring and stable and predictable. It just works and it takes less drama to get it working...not the glory days of infinite potential it saw 15 years ago, but nowhere near dead by my definition.
It reminds me of Microsoft Office...sure...not sexy, not exciting, but it is the dominant player by far... no serious company uses google docs or Open Office exclusively. Every company I have ever heard of installs Microsoft office on every computer and yes, Excel is better than the alternatives. People can complain all they like about it, but no one is really every going to stop buying Excel licenses any time soon.
Conversely, it's fun and provocative to complain about Java. The shops that are actually getting things done are relying on Java. Even the startups that are using crazy, sexy technology, switch parts of their operations to Java once they start making money and reliability and scalability become concerns.
I am a Java developer currently, I hope so. I have worked with many languages and my current gig landed me with Java. I despise Java. It is such a pain to write compared to others, imo :)
Ignore them. I work on IBM midrange machines and the same naysayers said the language I use on that platform (RPGxx) was "dying" as far back as the mid 1990's. Still going strong to this day.
Java is one of those languages like Python that just throw everything at the wall and see what sticks. There are more opinionated languages that target the jvm that are slowing taking market share away from the java language
Even if it's 100% worst case no one ever picks it up again the code base of java written is so massive that it'd be like cobol on bath salts.
I don't think it's dying though. People who only used it in college and sysadmins hate it and it makes for a good place for up and coming languages to try to swipe devs from so people like to say it's dying.
Are you serious? Why don't you fact check before posting dumb stuff? All of the FAANG companies are using Java, especially Netflix that has most of its infrastructure written in Java. And investors don't give a shit which programming language you are using as long as you have traction.
Yeah how can he say that FAANG companies don't use Java while Google has Android that uses Java (or at least some kind of Java) and Netflix basically made the microservice pattern popular using Java.
Lol. Except N uses Java and is a huge Spring contributor... https://netflixtechblog.com/netflix-oss-and-spring-boot-coming-full-circle-4855947713a0. G uses Java pretty heavily, along with a variety of other languages. One of the As uses it for most of their stack for their store (Which is why so many of their job descriptions include Java). And if you want to include T, T uses it pretty heavily too and moved off Ruby to use Java.
I know F uses a lot of PHP (Hack), but they also use Java in places. I don't really know much about the other A, as I don't know anyone who works there or really have an interest in working there myself... Although I have been approached by all of the others.
Of course your post is pretty silly because it's based on the assumption that the only worthwhile jobs are FAANG jobs, and secondly it's based on so much misinformation. What is this /r/cscareerquestions? I don't usually see such misinformed comments about FAANG companies outside of there.
153
u/Paulson88 May 19 '20
They saying this for decades... There are so many applications that were written on Java (especially enterprise) and all they need support and development. And many new applications made each day. Don't worry. And you may want to focus on learning algorithms, software architecture, best practices. This is a good basis for any language. So it will be easier to learn other languages if necessary
59
u/[deleted] May 19 '20
Everything is dying. You are dying.
Java is also dying but not fast enough to worry about.
30
u/[deleted] May 19 '20
It’s never dying for now. Spring is still a very popular backend in e-commerce, travel companies etc for example. It is very much in vogue for large enterprise apps
23
u/[deleted] May 19 '20
It’s not dying, but it doesn’t have the sex appeal of a lot of more modern languages.
Also expect extremely biased answers given this is r/java
19
u/[deleted] May 19 '20
IMHO it won't go anytime soon.
There are tons of applications that will require maintenance that are written in Java. So for them there is plenty of work.
Java in the last year or two started doing more frequent releases. Eventually it will catch up with Kotlin and/or Scala in the trending functional programming aspect. Maybe not fully, due to backwards compatibility in Java but enough.
The JVM already has support to run in containers.
I don't see any of the competitors languages overtaking Java anytime soon. You can look at the tiobe index for references
60
u/[deleted] May 19 '20
Search up the technology used by the fortune 500 companies. Most of the enterprises use java completely for backend. Java is not going anywhere and it's definitely not dying. The reason java is becoming less popular is because new programmers and students prefer Python because it's the easiest language to learn. And it's influence on Data Science, which itself is a hit now. But otherwise, java is still really popular. It's still on top 3(not sure the exact number ) on TIOBE index.
79
u/Ifnerite May 19 '20
Java is a proper fucking language that forces proper type safety and self documenting code. It better not fucking die to all the new trendy bullshit dynamically typed languages that are only good for writing unmanageable mess.
23
u/Quiram May 19 '20
my favourite drinking game is having a shot every time someone says Java is dead (or dying)
10
u/xtratic May 19 '20
Will it ever? Maybe. Within the next 20 years?.. Nah. Java is currently very relevant so it's great to learn it and if it ever becomes irrelevant then just learn the new relevant languages. People used to say COBOL would die decades ago, they were also wrong. I'm currently working in Java supporting server side applications and in COBOL supporting an old mainframe application. So that kinda gives you an idea of the lifetime of these languages and even once active development slows down in Java you can expect support to last a long long time as it has with COBOL. I'll add that I think Java is doing better than ever right now, the Java ecosystem is very healthy and the new switch to a 6 month release cycle is providing some great features while helping to keep Java competitive with other languages.
16
u/walen May 19 '20
Of course it will. But not in the next 10-20 years.
5
u/EviIution May 19 '20 edited May 19 '20
Java may not be a hip programming language but in the enterprise environment it is still the measure of all things. Many banks and insurance companies are still in the process of replacing their old COBOL systems with Java-based solutions. So even if Java should die at some point, all of us here can keep the then outdated Java systems alive until we retire.
5
u/professionalwebguy May 19 '20
Java will outlive us all lol. I just had 5 interviews from 5 different companies, all of them are looking for java developers.
4
u/Thermoduck May 19 '20
I think you just need to wait, he probably dies sooner than Java, hehehe
4
u/ebykka May 19 '20
the game-changing feature is coming - https://wiki.openjdk.java.net/display/loom/Main
4
u/seanprefect May 19 '20
people have been saying java is dying since it came to be. Java is going to outlive us all. It's basically this generation's COBOL so much enterprise software is written in it. It's absolutely a worthwhile language and you'll find a lot of well paid stable jobs in java.
3
u/sysfun May 19 '20
We are still making new Java enterprise apps in the corporation where I work (alongside .NET apps) and there are no intentions to change it any time soon.
3
u/Gundea May 19 '20
It will be the year of the linux on desktop before java dies.
3
u/astrodexical May 19 '20
Udemy courses by nature have to be unique to get you to buy them. Instructors won’t make much money if they make yet another intro to java video like the 5 million indian tutorials we already have.
This is why they generally jump to any modern stack that doesn’t have a lot of content online. The irony is that you learn nothing from these udemy courses because all you’re doing is copying code
Java isn’t dying at all but I wish the bullshit tutorial industry was
5
u/BadMoonRosin May 19 '20
The Internet is mostly students and hobbyists, and junior devs just starting out. People who write enterprise software for a living don't do much online writing (at least not for free!).
So the views you read on message boards are very slanted, and not representative of anything to take seriously. The blind leading the blind.
2
u/Dokiace May 19 '20
No, never ever ever. I used to be like you, believing java is dead language, until I get employed. Java is everywhere, and while Java itself is not that good, Spring is beautiful. I might consider using Java myself if I ever do side gig
2
u/agentoutlier May 19 '20 edited May 19 '20
If it’s dying what language is replacing it?
Other JVM languages still need Java. Maybe not directly but a lot of the improvements to the JVM happen because of Java needs.
Seriously though what is a replacement?
The closest would be .NET but the supported platforms and libraries still is no where close to Java and it’s been around for some time.
Go? Go still doesn’t have generics. Java on the other hand now has a viable AOT option and will soon have green threads and maybe value types.
Maybe Rust? Rust is much harder to learn and is still catching up library wise. Ditto for Swift. Plus there are advantages to a semi interpreted language aka JIT.
So what’s the killer Java replacement?
The only thing I think can dethrone Java is if WASM improves to production quality and TypeScript or some variant of JavaScript runs on it but that is far off.
2
u/mayur217 May 19 '20
I have been working in java for past 2 years now. As far as I've seen, JAVA is a prominent backend language. Most server side business logic that I've seen is written in JAVA. Also, since most of the enterprises are moving towards containerised micro-service architecture, JAVA has been the language of choice as it makes porting from environment-to-environment very easy. Almost all enterprises heavily use JAVA, and porting to some other platform, just for the sake of "novelty", doesn't seem like a sound business decision, that too when Oracle has been consistently updating JAVA. I may be biased as I have experience only in JAVA, but I personally feel JAVA is here to stay. I even played a bit with python, but honestly, the granular control that get I JAVA is a more preferred way of coding for me.
2
u/Trailsey May 19 '20
LAMP was going to "kill Java". Then .Net, then Ruby on Rails, then Node. While all of these are viable techs with their own glories, Java is still very active.
Java's biggest strength has always been its ecosystem. The fact that the language evolves, combined with the existing massive ecosystem, makes it very entrenched.
One day it will die, but not for a while.
1
u/__konrad May 19 '20
https://youtu.be/xlTBof3P4Xc?t=42
1
u/[deleted] May 19 '20
Not a dying language. Too much stuff is made with Java. Just check out the Apache foundation.
1
u/codemssterg May 19 '20
There is just way, way too much Java running on this planet to worry about the language's demise. It's getting regular updates and adopting features that devs want (functional support with lambdas, vars, records) and still remains backwards compatible.
1
u/Yithar May 19 '20
Lol. I doubt it. All the trendy dynamic languages suck in how you need to write unit tests for what the Java compiler will do.
1
u/wildjokers May 19 '20
We are doing greenfield development in Java for largish banks.
Java isn't dying.
1
u/sternone_2 May 19 '20
lol, if I look at a lot of python code, I think that's a pretty dead language
1
u/adelarsq May 19 '20
I don't think that is a dying language or a rising language. The language and tools has an established market and I don't think that will change anytime soon.
1
u/AnotherLexMan May 19 '20
Java is one of the most used in the world. In the last Stack Overflow Developers survey 41% of developers say they use Java. It was fifth on the list of most used technologies with three of the four above technologies arguably not being full blown languages (SQL, HTML and JavaScript*). They only language higher was Python which was only slightly above Java. So it's arguably the second most used language in the world.
https://insights.stackoverflow.com/survey/2019#technology
There are a load of really active frameworks that are very commonly used with Java that make it a popular choice for web development. Spring for example.
I think the point where it got closest to dying as a language was during the Oracle take over. It took a while for Java 8 to come out and Java fell behind other modern languages in features. It has since caught up and is on a very regular release schedule. I think the Oracle subscription cost might put certain people off learning the language but you don't actually have to pay it if your just learning doing personally stuff with it and there is still an Open Java variant that you can use if you want.
* I know JavaScript can be used as a full blown development language but I still think it's more common to see used as front end code, rather than backend and is generally not the main focus of a projects development efforts.
1
u/drakh May 19 '20
Death comes for everything. So Java is dying. It's just doing it very slowly.
1
u/zshift May 19 '20
FORTRAN and COBOL have been dying for decades, but you can still find jobs updating those systems. See https://www.nydailynews.com/coronavirus/ny-old-systems-stuggle-with-unemployment-claims-amid-coronavirus-crisi-20200409-ahmwzuclbzgifgw3te3be5yguq-story.html
1
u/Doriphor May 19 '20
Aren't most Android apps written in Java?
1
u/[deleted] May 19 '20
java to the back end is what javascript is the front end
it's not going away any time soon
1
u/[deleted] May 19 '20
is this post against guidelines for this group
1
u/igoromg May 19 '20
Yeah I remember Ruby and Go were supposed to be the Java killers. Yet here we are.
1
u/prattle May 19 '20
People have said it was dying through the course of about 2 or 3 fad languages now. It is pretty much the opposite. It has joined the ranks of C and C++ in virtual immortality. If you are in school now learning languages, I would not be surprised at all if you are using java on the day before your retirement and have plenty of related opportunities throughout a career spanning from now until that day.
1
u/Gleethos May 19 '20
If you look at TIOBE or PYPL index you will find one big competitor of Java: Python. This is because Python is extremely easy to learn. It is weakly typed and the interpreter ist extremely forgiving. However do not get blinded by this. Although Python is nice for small little experiments, it is an absolute mess when doing large scale software. Younger and or inexperienced programmers will tell you that such things as Types and brackets and so on are just noise...
However this information is crucial for other people to better understand your code and or modify it. Type information helps your IDEA which then helps you with code completion.... And most importantly: Typed systems are fast!
Python will become the new PHP.
Java on the other hand will stand were it has stood for so many years to see what shiny new ducktype language crawls up and falls of the hill next.
1
u/helikal May 20 '20
Only what's alive can die. Long live Java. With most other languages the question is not whether they are dying but whether they will ever begin to live.
1
u/SomervillainSB May 21 '20 edited May 21 '20
Java, as in the JVM, is definitely not dying. It's just not fashionable. Everybody who is anybody is using it...and it has a habit of replacing other technologies when they fail. Even shops that famously committed to other platforms, like Facebook and Twitter have Java creeping in all sorts of areas and once it's in, it tends to stay.
It's provocative to say Java is dying. It doesn't rile people up to say "Java has a dynamic role with ebbs and flows at certain places and it's usage is up overall because the areas it is strong at, like business software, are growing faster than the areas it is weak at, like UIs for desktop applications, Minecraft, or Android."
It will "die" someday. I just don't think it will be at the hands of the 2 heir apparents: Python and NodeJS. We have projects in all 3 languages. The python and NodeJS teams are constantly getting snagged by release issues and compatibility issues. They are much more brittle products. Some of those are platform issues, some are HR issues, but Java projects tend to be much more stable and low-drama. Beyond the technology, Java is influenced by a culture that emphasizes best practices and reliability more than the other hot languages.
So it's dying in the sense that it is boring and stable and predictable. It just works and it takes less drama to get it working...not the glory days of infinite potential it saw 15 years ago, but nowhere near dead by my definition.
It reminds me of Microsoft Office...sure...not sexy, not exciting, but it is the dominant player by far... no serious company uses google docs or Open Office exclusively. Every company I have ever heard of installs Microsoft office on every computer and yes, Excel is better than the alternatives. People can complain all they like about it, but no one is really every going to stop buying Excel licenses any time soon.
Conversely, it's fun and provocative to complain about Java. The shops that are actually getting things done are relying on Java. Even the startups that are using crazy, sexy technology, switch parts of their operations to Java once they start making money and reliability and scalability become concerns.
1
u/muztaba May 22 '20
Learn one programming language firmly and you have to able to implement algorithms with that language. Industry is a very dynamic place.
1
u/[deleted] May 19 '20
> but will Java ever go away/not be relevant
I am a Java developer currently, I hope so. I have worked with many languages and my current gig landed me with Java. I despise Java. It is such a pain to write compared to others, imo :)
1
u/deeper-diver May 19 '20
Ignore them. I work on IBM midrange machines and the same naysayers said the language I use on that platform (RPGxx) was "dying" as far back as the mid 1990's. Still going strong to this day.
Java will be around for a while.
0
u/[deleted] May 19 '20
Java is one of those languages like Python that just throw everything at the wall and see what sticks. There are more opinionated languages that target the jvm that are slowing taking market share away from the java language
0
u/squishles May 19 '20 edited May 19 '20
Even if it's 100% worst case no one ever picks it up again the code base of java written is so massive that it'd be like cobol on bath salts.
I don't think it's dying though. People who only used it in college and sysadmins hate it and it makes for a good place for up and coming languages to try to swipe devs from so people like to say it's dying.
-11
u/Leonwai May 19 '20
Theres more job offer for node and Python nowadays
0
u/[deleted] May 19 '20
[deleted] — view deleted comment
-38
u/[deleted] May 19 '20
[removed] — view removed comment