Hello, and welcome to the first part of my complete Java course. If you want to know more about me before you start reading my post, you can find my introduction post here.
In this series, my aim is to explain Java from the ground up in a way that you don't need any prior programming knowledge, but so that you also don't have to read forever before you can actually start coding. I know from experience that it's absolutely no use if a book or a website explains everything to you down to every last detail, since you won't be able to remember it anyways. Instead it's much more effective to only learn the important points, and then you'll usually learn the rest automatically by researching on the web (which you'll do a lot, no matter how much you read beforehand). I'll explain everything from zero, but I'll keep it simple and focused on the important parts.
In this first part, I'll be giving you an overview about Java, it's most important properties and how it compares to other languages. So if you're still reading, let's get started!
Java was first released in 1995 by Sun Microsystems. At that time it was terribly slow and there weren't many libraries. However because of its, at that time, new concept of executing code in a virtual machine it quickly gained popularity. In 2010, Oracle bought Sun Microsystems and continued Java's development. Today, Java is blazingly fast, has got a huge amount of libraries and runs on basically anything. According to the TIOBE Index, as of September 2018, Java is the most widely used programming language of all!
Probably the most important feature of Java is that it's executed in a virtual machine, the JVM (= Java Virtual Machine). This means that, unlike with many other languages like C++ or Rust, when you compile your code (simply put, compiling makes your code runnable), it's not converted into machine instructions that run directly on your processor. Instead the Java compiler produces something that's called bytecode and is then executed on the JVM. This has the huge advantage, that you can run the exact same file on any OS, no matter if it's Windows, MacOS or a Linux distribution. A disadvantage of this is that it's a bit slower, however the JVM has had a lot of time for being optimized and is really fast now, so that you will rarely notice the difference. And it's still much faster than interpreted languages like Python or JavaScript (don't mix up Java and JavaScript). Interpreted languages don't get compiled at all, they just run from the source code which is converted into machine instructions while the program is running.
Another important characteristic of Java is that it's object oriented. I will explain this in much more depth in a later chapter, but it basically means that when writing a program, you'll make objects for the different parts of the program, which then interact with each other. For example, if you were developing Super Mario, you'd make an object (or class to be exact) for Mario, and one for each type of enemy. Then, if the Mario object jumps on a Goomba object, the Mario object would add points to the score and then tell the Goomba object that it jumped on it, which would then display an appropriate animation and delete itself.
Something else that's nice about Java is that the syntax, i.e. how the code is constructed, is really similar to C/C++ and C#, which are really popular languages too. So not only can you use Java in a wide array of projects and jobs, once you've learned it, it's not hard to learn one of those languages too. In general, once you've learned your first 1-2 programming languages, learning another one becomes much easier and faster, similar to learning spoken languages.
Anyways, I think that should be enough for this post. I hope I was able to give you a good first impression of Java, and in case I sparked your interested, you can go to my profile to read my other posts about Java (at the time of writing this there aren't any, since this is the first part, but this will change soon), and if you don't want to miss future blog posts you can follow me. My next post will be about setting up IntelliJ which is an integrated development environment, short IDE. It helps a lot when coding by offering autocompletion, showing you errors without having to compile and much more. If you liked this post, I'd appreciate it if you could give me an upvote and maybe even resteem this. I hope to see you in my next blog, bye!