What is Java and Why Is It Special?
A free video tutorial from Arkadiusz Włodarczyk
Excellent teacher, Expert in Programming
26 courses
343,698 students
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!
10:57:49 of on-demand video • Updated September 2024
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
constructors
interfaces
exceptions
packages
polymorphism
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, what is a compiler and many other things like that. Okay, these are basics and this lesson is very, very important in order to understand anything in, well, any language, not only Java. If you want to understand programming, you have to watch this lesson. Okay. After this lesson, everything is going to become clear. Okay. So what is Java? Java is a programming language that we use to talk with our computers. Our computer is talking in a bit different language than we are talking. Right? I'm talking in English language right now. And you understand me pretty well, right? But our computer likes things like that. 01011110011111111. Why? Because these are electric impulses, okay. And, well, they jump from 0 to 1. And that's how computer is interpreting everything that you see right now okay. It interprets the sequences of zero and one. It will be very hard for us to write programs like that, right. Imagine writing things like that. That will 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 if when we learn the rules like we learned, for example, for English. Right. Or another language and, well, we're just gonna be able to talk So, for example, we can write later something like integer B and it means, hey, you know, I want to save in the 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 thing would mean I want to reserve something for computer Okay? It needs to be also changed to 010101, and the process of changing this into 0101 is called compilation. Okay. So programming language is something that is understood by us as syntax. This can be easily changed into zero and one. Right. And why did I put so much effort to, you know, tell you what is a programming language. Because 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, you know, writing the programs in Java for many years. Okay. So what's going on here? You know, normally let's for example, see here a programming language like C plus plus right. When you write a code okay. So imagine here we have got some kind of code. So we have got something like that right. And B or other things like that. Or you know something like that in Java or whatever. We have got some kind of code here. And this code is gonna be changed by something what is called compilation. Right. So we can write here. Compilation. Right. So this thing. Uh, is going to be changed into the zero and one. Right. 010101. Well this code is called machine code. It's going to be executed. There is a small problem in the C plus plus solution because you know there is windows. There is Linux, there is Macintosh uh, 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 zero and ones, it needs to know the processor that is going to execute the instructions here written in that code. 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 you can have on windows libraries that are not available on Linux. And then you have to write code many times. Wow. This is horrible, right? If you want to support many platforms, the cool thing about Java, and that's why it's one of the most in demand and highest paying programming language, is that the slogan of Java is write 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 got a process that is gonna change this code right into something. What is called byte code, byte code. So it is something like between the code that we have got here and that we have got here, 0101 right. That byte code is not going to be, you know, useful for us humans because, well, we cannot read it, but it is very nicely written code that is going to be interpreted by something what is called Java virtual machine. Okay. 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 or Linux. This thing is gonna change bytecode into zero and one okay. And that's cool, right? It's gonna change this thing into bytecode that can be interpreted on any platform. That's why it's so awesome. But you have to also remember that you have to install this Java virtual machine. So without the Java virtual machine it's not going to be you know, you're not going to be able to run it. We're gonna install later something like that. That's called NetBeans. is an editor that allows you to write a code in place like that. And this code is looking like that, like public class Java application. We're gonna talk like, what is the public? What what is public meaning, what is class and other things like that. Right. We're gonna click play like here and it's gonna compile this thing. Right. So this code, the programming language into something code is called a byte code. And then the byte code is going to be run by Java Virtual machine 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 plus plus solution. You have to choose this or this. 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 looks similar right, then it's gonna create in the bytecode a special 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 going to be used very often, it's gonna even sometimes run faster than in C plus plus, okay, because it's gonna create special connections that are gonna make run things that are run very often. So it really depends on situation. So Java is more time slower. Sometimes it might be even faster than C plus plus. But the truth is that you shouldn't worry about it because our 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 plus, plus and other languages that are like C plus plus are very important. And 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 here, right? So the compilation is changing code from one type of code to another code. Right. And compilation also you know, check if you made some errors. So if I do something like that, as you can see and when I click play hi there are some errors right. It helps you debug your code so you can find bugs, the problems, the errors in your code. We talk about things like that. Also. Later we will install the IDE integrated development environment so that this editor that has got lots of useful tools will talk about all these things later in this lesson. You right now know what is programming language. The programming language is used to create programs. So instructions that are gonna be executed after changing it into the machine code by our computer. So we are giving requesting computer what to do. It's like forcing him to do it's 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 when when I click play, as you can see, we have got 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 only the lesson. Thank you very much.