Java Tutorial - 1 | Edureka

preview_player
Показать описание
Take instructor-led Live class on Java Tutorial at :

The following topics were covered in this Java Tutorial:

Why Java needed?, the Genesis of Java, The Creation of Java, Why Java is important for Internet, The Important term in java BYTECODE, JVM, Java Virtual Machine, Naming Convention of Variables, if - else statement, Nested if - else, Switch Case statement, Operators.

What is Java?
Java is not just a programming language but it is complete platform for object oriented programming. It uses the OOP's concept like inheritance, encapsulation, polymorphism, overloading, overriding and so on. In java everything revolves around object i.e we have to create object in java to do anything because it is an object oriented language. There are two things present in java.
JRE(Java Runtime Environment):
Whenever you have to run java applications on your system you need an environment for that. E.g.: Human beings are able to live with the help of environment setup like oxygen, food etc for survival. JRE includes class libraries which provide Application Programming Interface (API) and JVM.
JDK(Java Development Kit):
It helps you to develop java applications. So you need to check whether jdk is installed on your system before developing a java application. JDK provides all the needed support for software development in java.
Byte code:
Java byte code is the form of instructions that JVM executes. A java programmer does not need to be aware of or understand java byte code at all. The model of computation of java byte code is that of a stack oriented programming language. Stack is a data structure that follows LIFO(Last In First Out) i.e the last element coming into stack is the first element comes out of stack.
Garbage Collection:
Garbage collection is related to memory management in java.As a programmer you are not responsible for memory management in java because it is completely handled JVM which has a thread "Garbage Collector" to do this.
How Java works?
Java compilers convert your code from human readable to something called "byte code "in the java world. i.e source code will be converted to .class file when compiled with javac compiler. JVM is machine dependent thing present in with every OS. Every JVM understands the byte code and convert into machine code which is understandable by that Computer/System.
What is JIT?
JIT (just-in --time) compiler is a program that turns java byte code into instructions that can be sent directly to the processor.
JVM has 2 things: Interpreter, JIT Compiler( subset of JVM)
Both of these (interpreter and JIT compiler) will work side by side to convert byte code into instructions that could be understood by machine or the processor.
In the figure we divide the environment into compile-time environment and run-time environment. In the compile-time environment we will write our java application and compile the source code into byte code i.e .class file. Now this .class file is sent to other computer through network or locally.
Now the environment is run-time environment. When the .class reaches the other computer it will find class loader that loads the class into JVM. Class loader verifies byte code if any malicious code is there with the help of java libraries and acts as gate keeper. After byte code verification JVM comes into action which has an interpreter and JIT compiler.
The interpreter will start interpreting .class file. The interpreter reads a line and converts into instruction and sends it to processor and moves to next line and does the same thing repeatedly for all line in the .class file.
What is the use of JIT compiler?
An interpreter will read the lines of the code one by one and convert into instructions whereas compiler reads the whole code at once and convert all of them into instructions at once. JIT compiler helps us in speeding up the execution when we have to execute set of statements repeatedly. When the interpreter encounters such type of statements it sends to compiler to execute that code. The compiler will compile and save these instructions into cache memory.
Cache memory is fastest and temporary memory. Now whenever the interpreter once again encounters the repeated code it fetches those instructions from cache memory and do not interpret. This way the interpretation is made faster. When all byte code is converted into instructions the application will run on the system to which we have sent our byte code.

Рекомендации по теме
Комментарии
Автор

Thank you Guys for your  feedback. We are glad that our video helped you so much.

edurekaIN
Автор

soo much for sharing most valuable information

maheshsr
Автор

Great tutorials man, I just started making my own programming tutorials too..

KrisFoster
Автор

Very helpful and very easy to understand

pavithrapavi
Автор

very nice explanation of java being platform independent....thank you

MySanjukta
Автор

I have understand the concept for java
Thank you a lot

lakshmireddy
Автор

good informative....Thank you so much...:)

prahladaperugu
Автор

Due to JVM the slogan of Java should be changed. It should be like this "Compile once, " interpret" and run anywhere".

AliAkbar-vote
Автор

really nice explanations and will be good if even you can provide one instructor for answering the questions after watching the videos here :-)

SunnyDeep
Автор

Very helpful and nice explanation ...thanks a lot

vinodsagar
Автор

Thanks vineet sir.this tutorial helps me alot.

abhijitparadkar
Автор

Approach is great. Explanation of the JVM and JIT was fantastic. Provide the details of OCJP.

vrammohan
Автор

This is a Great Video Tutorial, thanks so much.

websachi
Автор

wow. fantastic class ever I have gone through. thank you so much sir

sherinjohn
Автор

many many thanks, the sound and display are really good. we aspect this type of video for learn properly. I want PHP tutorial (detail).

ifkatfarzanamozumder
Автор

Thanks this was a great video, extremely useful and thoughtfully delivered.

RichEmman
Автор

Nice explaination, Which presentation tool you have used, Is it prezi or powerpoint

TheKailash
Автор

*Great informative video. Thanks for sharing!*

shreesen
Автор

nice i want to know how to download and operate

prasadc
Автор

There are multiple videos under same name in your java playlist, is there any difference? +edureka!

himanshutanwani