- It's a popular programming language with a large and diverse install base;
- It's commonly used in server-side backends, and in a modified but recognizable form, for Android app development;
- It's an imperative language whose dominant paradigm is object-oriented, but Java 8 and later bring in constructs familiar from functional languages;
- It's verbose and doesn't favor cleverness. If you think this is a drawback, avoid it.
A comparable language that's better-designed in C#. However, in many settings, it is less used.
A language which was designed with most of the same design goals as Java is Go. The two nonetheless ended up perceived as quite different.
And even if people would suddenly stop writing new software in it, there's so many systems by now that are written in Java and need to be maintained that you'd still be able to use that Java knowledge for at least ten years.
The main selling point of Java is that it's easy to write software in it, so that means little developer time for relatively featureful and bugfree software. There's also a lot of tooling around Java.
It does not fare well in performance or resource usage, and is mainly geared towards writing big software projects.
Personally, I'd say it's definitely something you want to have in your repertoire at some point, unless you already have concrete plans on specializing into a direction where you know that it's not useful.
You might not use the tools immediately but the fact you can debug java stack traces using one of the more "fun" languges certainly doesn't hurt.
Another perspective: if you ever get in to data engineering it's usually a big requirement to know something java related.
If you do decide to learn it, make sure to use recent educational materials for Java 8+, so you learn how to use advanced features like lambda functions and unsigned integer types.
Beginner will either want a job or write some simple apps. "enlightening" languages are worthless for them.
That said, I can't say I particularly like Java, or find it fulfilling or interesting in the same way I like elegant and clever C++, or even Python. It's had all the sharp edges filed down, making it a pedestrian and mundane language. But that's of course why a lot of companies use it; it's a known quantity which you can have a team of people work with and get a working result in a planned timeframe. On the downside, there are too many people who only ever developed with Java, and can only think about design within the constrained limits of what Java allows, i.e. basic OOP. Definitely learn more than one language so you have a wider appreciation for what's possible.
Personally, I'd recommend Python 3 as a first language to get started with today. You can rapidly get started doing interesting stuff with a minimum of fuss and vastly less unnecessary verbosity than Java. It's also less constraining with regard to design; it doesn't force the use of classes and OOP like Java, so you can experiment with different ways of doing things.
https://www.tiobe.com/tiobe-index/
I think the most certain thing I can say is that Java has a bright-present, and a not-dim near-future.
https://spectrum.ieee.org/static/interactive-the-top-program...
that list is a nice guide on what you should learn in general.
Once learned compliment it by learning Scala.
- Interpreted: Current choice is Python, pretty much hands down undisputed. Personally there is a lot to dislike about Python (who doesn't like 24 byte integers?) but that's how things are.
- Compiled (VM based): My choice here is C# instead of Java or Go because (1) C# is now available cross platform and more "free-er" than Java (2) its much more upto date in virtually every respect (3) it has great tooling and rich library to speed up the development (4) its not owned by Oracle and it doesn't ship with spammy browser toolbar to unsuspecting users (5) unlike Go, folks working on C# are not stuck in excessive minimalism. Almost exact opposite, they want C# to have good features from every other language out there with massive new releases each year. That's great - at least for me - because I've access to everything from very powerful lambdas to parallel paradigms to async features, when I need them.
- Compiled (direct to metal): I'd like to chose Rust in future but I'm going to recommend C++ instead for now. If you are working on pretty much anything at the deep end of the computer science including OS kernels, writing your own compilers, building runtimes of variety of tools like TensorFlow, graphics engines, physics engine, embedded libraries etc - then you need to learn C++.
Having said that, if your purpose is to just get job go with Python and Java. These are #1 and #2 languages according to IEEE Spectrum in job postings:
https://spectrum.ieee.org/static/interactive-the-top-program...
https://en.wikipedia.org/wiki/ALGOL_60#Examples_and_portabil...
It is worth learning the JVM as a runtime which is essential to many businesses and the maven build infrastructure as the progenitor of most modern build and dependency management systems.
If you want some suggestions from a purely learning point of view, for OO try smalltalk, for FP try haskell, for systems programming try rust, for the JVM try scala.
From a commercial point of view Java might be worth it. It's easy, reasonably well compensated, and ubiquitous enough that there will be plenty of work in Java for at least the next 30 years.
* If you want a steady job in a large organisation then Java will probably keep consistently employed, but probably also uninspired.
* If you want to learn some powerful programming concepts and gain solid CS foundations, then I'd suggest reading SICP and learning Scheme.
* If you just want to learn something that you can be productive in quickly then Python is a good choice.
* If you just want to tinker with web pages, etc then Javascript.
It is very hard to predict which languages will be considered great in the future. Go, Rust, Kotlin, Clojure, Erlang, Swift, etc all have their ardent fans and when you understand their reasoning you might be in a better position to make your own informed decision, but I would not suggest learning any of those as your first language.
It may not be worth getting good at it, unless it's purely a way to get a job at a big company.
Brightest futures seem to be Python (for data science and AI), Rust, Elm, Kotlin, Go, maybe F#, and probably Swift.
Regarding Java, i think its a good starting point if you want to hack your first web project together. You sort of see how everything works together. Before that I always recommend looking at C just to know what you are missing out on. If there is some calculation happening you can always call some C/C++ code to see if you get some speed ups by optimizing for the cache (just an interesting experiment if youve never done it before.
Java, C, OCaml, Haskell, Javascript, Erlang, Prolog, Lisp, Rust will all add valuable skills
I'd recommend learning Kotlin instead though. It does nearly everything Java does, but better. One of the few new languages that feel fun to hack with but don't feel hacky like JS.
Really? It depends. Its use is massively widespread, and will be for, at minimum, the next decade (or two). So, it is a very marketable skill. But it's not as "hot" or (for my very subjective viewpoint)"fun" to write.
So: It depends. On goals, on preferences, on you.
IMO with all the other languages available Java just doesn't really offer anything special enough to warrant it's dealing with it's awkward type system and verbosity. Unless you want to do something with Java specifically like Android dev it just doesn't offer anything worth the pain. If want higher performance and the type safety that Python doesn't have I prefer Go. It's syntax is very similar to Python and it has some interesting concepts.
Whatever you choose don't choose based off hype/promises of jobs. Most companies will hire engineers who have never used the language(s) in their stack as long you can demonstrate knowledge of core programming concepts. Python's `list`, Java's `ArrayList` and Go's `slice` might have some slight differences in implementations and different warts and what have you but deep down they are arrays. If you are familiar with the data structures and algorithms core to programming you can learn to use any language to solve problems.
At the end of the day a language is just a tool. The concepts that underpin these tools are what is important. So choose a tool you enjoy using and fits the scenario. Here are some links that were helpful for me, hopefully they will be helpful for you:
Python:
- https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial... - Good tutorial written for Flask.
- https://docs.python.org/3/ - Python docs, lots of good info there
- https://docs.djangoproject.com/en/2.0/intro/tutorial01/ - Django tutorial. Good intro to developing applications with Django, probably the most popular/common Python web framework.
Go:
- https://tour.golang.org/welcome/1
General:
- https://www.codecademy.com/catalog/subject/web-development - Very basic tutorials, has Java and Python as well as others
- https://github.com/jwasham/coding-interview-university - Lots of general CS info, this is the important stuff