What is Java and Why Is It Special?

A free video tutorial from Arkadiusz Włodarczyk
Excellent teacher, Expert in Programming
Rating: 4.5 out of 5Instructor rating
21 courses
335,641 students
What is Java? Why Java is so special?

Lecture description

Java is one of the most in demand & highest paying programming language.

Java slogan is: "write once, work everywhere".

It's very popular on all platforms. You can use Java to create Android applications, desktop applications on any system and many more.

One of the most popular game called Minecraft is created in Java.

After this lesson you will know:

  • what is Java
  • what is programming language
  • what is JVM

Learn more from the full course

Java from Beginner to Expert

This Java course was created especially for beginners in Java. Learn Java from scratch. Become Java Expert!

11:04:11 of on-demand video • Updated December 2023

the semantics of Java (the meaning of words)
what is a compiler / IDE
variables / types of variables
operators - arithmetic, assigment, logical, bitwise
conditions like if / else / switch
arrays / multi-dimensional arrays
loops - for / while / do-while
methods, overloading/overriding methods, passing variables to methods etc.
object oriented programming
reference variables
down casting
lambda expressions
classes/abstract classes
and many more
Hello my friend today I will tell you what is Java. What is programming language? What is Java Virtual Machine (JVM), what is a compiler and many other things like that. OK. These are basics and this lesson is very very important in order to understand. anything in any language not only Java if you want to understand programming, you have to watch this lesson. OK. After this lesson everything is going to become clear. OK so what is Java, Java is a programming language that we use to talk with our computer somehow right. Well you see our computer is talking in a bit different language than we are talking right. I'm talking in English well language right now and you understand pretty well right. But our computer likes things like that 0 1 0 1 1 1 1 0 0 11 1 1 1 1 1 1 1 Why? Because these are electric impulses. OK. And well they jump from zero to 1 and that's how computer is interpreting everything that you see right now OK. It interprets the sequences of 0 and 1 it will be very hard for us to write programs like that. Right. 0 1 0 1 0 1 and if it would mean Hey show me. Show me the pixel in the colour like 'that' And for example I don't show the button, click on button or something, can you imagine writing things like that that would be horrible. That's why we have got something what is called programming languages that are... you know having syntax that is you know easy to understand for us it is not as easy as for example right now English. Right. But it's gonna be easy when we learn the rules like we learned for example for English right and/or for another language and well, we just gonna be able to talk. So for example we can write letters something like integer B and it means hey you know I want to save in that random access memory so in the RAM a place for the integer so it means I want to save a number somewhere right. I want to find a place like that. And this being would mean I want to reserve something for computer. OK. It will be you know... well, this thing would not mean anything for computer either, because it's also understandable only by us. Right. It needs to be also changed to 0 1 0 1 0 1 and the process of changing this into 0 1 0 1 is called compilation. So programming language is something that is understood by us. but it's you as syntax this can be easily changed into zero and ones Right. OK. So this is a programming language. And why did I put so much effort to you know tell the world is a programming language because you know in Java the process of compilation is a bit different. It's very hard to understand for people new to Java. And some people do not even understand it, after writing programs in Java for many years. OK so what is going on here? You know normally let's for example write here a programming language like C++. Right. When you write the code. OK so imagine here we have some kind of code so we get something like that right. And B. Other things like that or you know something like that in Java or whatever we have with some kind of code and this code is gonna be changed by something. What is called compilation. Right. So we can write you a compilation. Right. So this thing is going to be changed into the 0 and 1 right. 0 0 1 0 1. Well this code is called machine code. It's going to be executed and everything is OK. There is a small problem in the c++ solution because you know there is Windows there is Linux, There is Macintosh Android and other things and other platforms like that. The problem about it is that when you make that compilation. Right. So we changed this code into the 0 and ones it needs to know the processor that it's gonna execute the instructions here written in that code OK. And because of it when we compile it on for example Windows it's gonna you know be able to run only on Windows. So you have to later compile it also on. For example Linux. And the problem is also that on Linux you can have libraries that are not for example on Windows and vice versa. So you can have on Windows libraries that are not available on Linux. And then you have to write code many times law. This is horrible right. If you want to support many platforms the cool thing about Java and that is that's why it's one of the most in-demand and high paid programming language is that the slogan of Java is right once and work everywhere. Why and how did they manage it. Well Java is doing something like that when you have got a code Right. So we have got a code like that. We have a process that is going to change this code right into something. What is called a bytecode, here, byte code. So it is something like between the code that we've got here and that we've got here 0 1 0 1 right this bytecode is not going to be you know useful for us humans because we cannot read it but it is very nicely written code that is going to be interpreted by something called Jaba Virtual Machine (JVM) Ok this is a program, this is an application that you can install. This is a platform that you can install on any computer on Android with Linux. You can find it here. We can you know type Java Virtual machine download and we can download it later. We gonna install it, for example an editor other things like that and this thing is gonna change bytecode into zero and one OK and that's cool. Right. It's gonna change this thing into bytecode that can be interpreted on an platform. That's why it's so awesome. But you have to also remember that you have to install JVM on a machine so wihout JVM It's not going to... you're not gonna be able to run it right. OK so that's why Java is so cool. So let's remind ourselves we gonna install later something like that. That's called Netbeans it's an editor that allows you to write a code in place like that. And this code is looking like that public class JavaApplication4 we gonna talk like what is public meaning what is a class and other things like that. Right. And we gonna click play like here and it's gonna you know compile this thing. Right. So this code that programming language into something what is called a bytecode. And then the byte code is going to be run by JVM like in time just in time because well you know you might be like now: "Hey, this must be very slow" and you are right it is slower than the C++ solution. But you know you have to choose this or this, do you want speed or you want to support all platforms but it's not (also) very very slow because for example when you have got a code that look similar in some places. Then it's gonna create in a bytecode a special you know instructions that is gonna make it simpler right. It's also not gonna compile all your code. if some of the instructions are rarely used. If something is gonna be used very often it's going to even sometimes run faster than in C++. OK because it's gonna create special connections that are gonna make around things that are run very very often. So it really depends on situation. So Java is mostly slower. Sometimes it may be even faster than C++. But the truth is that you shouldn't worry about it because computers are faster and faster each day. If you want to write applications desktop applications or for example Android applications things like that do not matter right. If you have to write drivers where speed really matters then C++ and other languages that are like C++ are very important right. OK. Remember that even games are written in Java for example. Popular game like Minecraft was created in Java so you have to know that there is a process that is called a compilation. Right. So the compilation is changing code from one type of code to another code right and compilation also you know checks if you do not if you you made some errors So if do something like that, as you can see and when I click play there are some errors. And also it helps you debug your code so you can find bugs the problems that erasing your code. We talk about things like that. Also later we'll install the IDE (integrated development environment) so the editor that has got lots of useful tools and we'll talk about all these things. We'll also instal the Java runtime environment which is which has got JVM inside it We'll talk about all these things later in this lesson. You right now know what is programming language. Right. The programming language is just some kind of set of rules that you have to follow in order to speak with somebody, right? the programming language is used to create programs. So instructions that are going to be executed after changing it into the machine code by our computers. So we are you know giving requesting a computer what to do is like forcing team to do its commanding him hey do something like hey go into the system and then out of it and then print a line like for example. Hello world. And then when I click play as you can see we have word here. Hello World We'll talk about you know why here is a dot (.) why here is a 'public' how these rules work with each other in next lessons. Remember that if you have any questions just ask me I really love helping other people. That's all in the lesson. Thank you very much.