Is it like JavaScript? No!
Java programmers are valued, they do complex projects, and they are especially loved in the Android development environment and in various corporate fields. Here's what the language is and why it's worth learning.
The main point is brief:
Multi-platform. Works on a huge number of operating systems and hardware.
Object-oriented programming. For those who like clear structures and data delimitation.
Large community and lots of code already written. No problems with work and ready-made solutions.
Cons - also briefly:
Lack of speed. Sometimes this is critical.
Lots of verbose code. Where C++ uses one command, Java requires five.
Suppose we have some code in Java. So far, it doesn't matter what the syntax is, how classes are arranged, etc. It's just code. How to execute it?
If it were a language like C++, we would have to compile it for the desired hardware or operating system. To compile, that is to convert the code we understand into instructions understandable to a processor. Since there are many processors, we would have to compile in different ways. There are many processors, and different operating systems have different components, buttons, networking, and so on. Before compiling, you have to modify the program to suit these features.
The power of Java is in the JVM (Java Virtual Machine). It is a program which translates human-readable Java code into code understood by the processor. To make the code universal the developers have made virtual machines for each operating system and processor. These machines take into account all the peculiarities of their platform architecture and know how to process any Java command. This means that the same Java code can be run on your phone, your computer, or anywhere else.
So you can run Java code everywhere for which a JVM, i.e. a Java virtual machine, has already been developed. For example:
ultra-powerful servers,
computers,
smart phones,
push-button phones,
robots and microcontrollers like Arduino,
Raspberry Pi and many others,
fitness bracelets,
GPS trackers,
smart watches,
smart TVs,
refrigerators,
microwave ovens,
kettles and other home gadgets,
smart cards for indoor access.
Imagine the following situation: you wrote a Java program that monitors the free space on the disk, and as soon as it becomes less than 20% - it displays a message saying "Delete unnecessary files". Now you can run this program everywhere you have a JVM. It will sort out the code itself, see what processor it is doing it for, and run your program. As a result, the same code will keep track of free space on your computer, pushbutton phone, smartphone, tablet, smart microwave, or home alarm system.

Independence from architecture and platform. You write code without thinking about the peculiarities of the operating system or processor. All this is done by virtual machine, and you only write the logic of the work.
Object-oriented programming. OOP is the modern standard for programming in commercial and industrial systems. In the case of Java, this will work itself out: the fact is that, like Ruby, Java is a pure OOP language. In it, even functions have turned into methods and can only exist inside a class.
Working with memory. The programmer does not need to keep track of how much memory his program uses and how to free it when a variable is no longer needed. For this purpose automatic memory management is implemented in Java: Java does not allow its leaks and growth of size, and after program's termination frees all resources.
Security. The virtual machine itself makes sure that the program doesn't get access to anything that goes beyond its authority. For example, a Java program can't read the contents of the rest of the RAM, or contact another computer, unless the original access rights provided for it.
Large community and support. Java is the third most popular programming language in the world. There are thousands of sites on the web, which tell about this language, help to understand the code or contain ready-made solutions.
The standard in corporate programming. Large companies want programs to be reliable, stable, and maintainable for a long time. The combination of OOP, memory management, and architecture independence makes Java the perfect solution for this.

