It's a somewhat verbose language, so many don't like it.
Half the web's bigger website and and tons of business internal software use it (or a mixture with other JVM languages and other languages) either way, 'cause it's stable, fast, fairly predictable to develop with, and works for most programmer teams.
Basically, one of the most used programming languages for software that "gets the job done" in the world, so to speak. As such, one that many entities hire programmers for.
Some one should red pill you on Google.
Java is disliked by university kids that have never written a line of paid code, mostly because after Python or Scratch it was their first experience with an actual programming language, and they struggled with it, and struggled with the syntax.
Actual learned and experienced professionals do not care, which is why Java is chosen everywhere from Google to NASA, LinkedIn, Twitter, eBay, Amazon, Boeing, Raytheon, you name it.
Financial is rewriting COBOL and Fortran in Java. DND is rewriting Ava in Java.
The syntax is a feature, not a flaw, and it makes debugging or maintaining sometime else's code infinitely more efficient. In any case the IDE handles most of it.
Java offers both portability and speed. You'll find Java on the most mobile devices and embedded devices of any language, and that's even before we start talking about Android and Google's retarded choice of the Dalvik VM.
Java is slower than C/C++, but resources are cheap so that no one really gives a shit, and they use C++ where they absolutely must, and Java for the rest.
The JVM is a brilliant piece of optimizer technology.
It has the best libraries and tooling of any language, and its predominantly free.
You can do anything from write smart card firmware, cell phone firmware, appliance and embedded system firmware, up to the most widely used web applications.
There, you've been red pilled.
You'll hear alot of complaint about it but this stems from older revisions. Java used to consume large quantities of RAM and generally run inefficiently. Significant changes have been made in the last 20 years.
Primary uses are extensive although it's pretty much phased out of web use (mostly due to security issues). Biggest benefit to Java is that it is cross-platform since it is compiled shortly before run. The structure is similar to c++ and really any other OO language.
The JVM has had more man-hours poured into its garbage collector and JIT than any other language runtime on the planet, and it shows. It's quality software that saves you from the memory safely woes of C, the bloat and lack of ABI of C++ and other issues of native dynamic linking. It is very fast indeed.
Java as of version 1.8 is an okay programming language, though still verbose and inexpressive. The good thing is that Java doesn't really matter; you can use any reasonably mature JVM language at this point: Scala, Clojure, Kotlin, etc.
Well op if you want to program on android you do so in java. If you write an android program or any java program and you want to connect to a database via Internet yoy can do that with java. That is to say you don't need to learn or use php at all. Java is and always will be slower than c but a hell of a lot of work has been done to make it competitive and that obviously has paid off. It's also got massive amounts of libraries and documentation. Youtube has plenty of good tutorials as well.
I'm aware. I was looking to make the distinction between Java ME phones and Android, and also highlight the stupidity of Google trying to undermine Java just like Microsoft did twenty years ago.
Java is the only language hilarious enough to frequently produce classes named "AbstractSingletonProxyFactoryBean" (something from Spring framework) casually.
It's not really my favorite language, but a language is a language nonetheless and very little differs from one to another other than some specific kinks and (non)enforced paradigms.
All give you about the same datatypes to work with and algorithms are more or less the same.
>Java is disliked by university kids that have never written a line of paid code, mostly because after Python or Scratch it was their first experience with an actual programming language, and they struggled with it, and struggled with the syntax.
I just finished my degree. I was taught Java as my first language and I think its a fantastic. Im learning C# now so I can apply for all the .NET jobs around me, I like it as its so similar to Java
Let's say I want to develop a new piece of software. I have a the following requirements:
1. It needs to be free and open source because thats the way shit is nowadays. This kills the C# (nobody uses mono lol).
2. It must be staticly typed because all succesful software grows big enough that you really want. This kills the PHP, Python, Ruby, Perl, Lisps etc etc.
3. It must be memory-safe because I'm not writing device drivers or some such. This kills the C and C++ among some other probably.
4. It must be understandable by non-autists, type system should be simple as possible while still being useful. This kills the Haskell, Rust etc.
At this point you're pretty much left with Java. It also has a shitload of libraries, good tools and it runs at a bretty gud speed, so you're off to a quite good stard.
It's a popular language for enterprise (and a great one at that). This makes it one of the most hated languages among fat neckbeard NEETs who are infatuated by C, the free software movement and anime.
Java is a language that is meant to be run in a virtual machine.
The idea is that one team make the virtual machine on all platforms.
Write once, run everywhere.
The overhead of using a virtual machine is small enough that people will justify the language.
People who are against the language thinks that java does too much hand holding and that you cannot make pretty code because safety from shit programmers is more important than readability.
People who like the language say that it is simple to use and since it runs everywhere and has decent performance, it is worth it.
Try it out. See if you like to write this way.
All languages have certain advantages and disadvantages. Java in particular is very controversial to beginners and newcomers whom have never touched OOP because it introduces a lot of concepts which are handled questionably by traditional developers. Java's problems extend fairly deep and there are a lot of facets to explore as to why Java is pretty flawed.
Firstly, Java is great for developing cross-platform code due to JVM. Likely, in today's day and age, JVM is by far the best part about Java. JVM is cross-platform, incredibly versatile, features JIT, profiling tools, and a client+server model, but most of all, really good debugging. JVM inherently interprets code, therefore it can provide fairly accurate traces of where the code failed. In addition, the exception, as implemented by JDK helps the developer out a lot, although in my opinion is far from ideal from something like Perl. As far as performance goes, JVM isn't too shabby but the overhead isn't "insignificant" at all. One issue is the lack of link-time optimization and Java is in absent in a lot of optimizations including vector operations for modern computers. This isn't terribly disadvantageous though, because I imagine that a lot of Java's operations don't involve large computational problems. JVM is also decent for security, provided Java is up-to-date. In general, JVM has a complicated permissions system implements ACLs in addition to being able to sandbox code. JVM also packs multiple memory management and garbage collection methods.
However, Java as a language holds fewer merits. Although Java has much better threading (at least in relation to their language), Java ultimately has a lot of cruft that complicates coding. awt, SwingX, and applets are awful, slow and a pain to double buffer as well, relying on the pane as a single object. Java's incompleteness goes on; treating arrays as primitives rather than decomposing to pointers, serious typecasting problems, and forcing indirection, etc.
The language itself doesn't suck as badly as some people believe and it has been used for a lot of very important software, but as far as *learning* statically typed OOP, there were already better alternatives in the 90s.
Many other languages are bad for beginners for the same reason.
Java was developed for the Internet. You can have just 1 file on your website that anyone on any machine could download and run. It even executed natively inside the browser.
These days, Java is being phased out on the Internet. However, Java is great for use on servers. Why? You write something in Java, and 10 or 20 years from now, when the servers' hardware has changed multiple times, your code will still run fine.
Java is more efficient because it just works. You don't need to worry about hardware compatibility.
Yeah but JavaEE configuration sucks, it's a mountain of deep and complex layers. JSF sucks. Specifying view mapping on Web.xml is horrendous (you can now use annotations, but software have to be maintained...). And JavaFX still has not replaced Swing.
>Everybody assumes it's the best simply because they heard other people claiming the same thing and don't want to bother trying anything new on their own.
That sounds more like Lisp.
Why is Lisp the best? Because a blogger said it. Why did the blogger say it? Because someone on Usenet said it. Why did he say it? Eventually you get to someone who was involved in Lisp or Lisp machines and they say it's the best because shilling for Lisp is literally their job.
Glad you mentioned this, as I was about to. Another common one in the field is Struts, but I much prefer Spring and bundle it with their AOP frameworks.
We use Spring and Hibernate here in gov. contracting projects.
>I read a book about Java, and found it an elegant further development from C. But I have never used it. I did write some code in Java once, but the code was in C and Lisp (I simply happened to be in Java at the time).
>By contrast, I find C++ quite ugly.
- Richard Stallman
He should have made it look like Scheme. Nobody would have used it no matter what the quality was. As a bonus, he would have the Lisp community telling everyone how (+ 1 #[1 2 3]) printing "11,2,3" was "mathematically correct" or some bullshit.
My biggest complain with modern Java is its OOP roots. We don't write code on the same OOP style that we did 20 years ago.
Everyone is talking about more functional-like approaches and even though they are trying to fix that (we have prototypes now for once) it feels slow compared to other emerging technologies like Node, Go or even Haskell.