Java Tutorial – 1 | Edureka

Java Tutorial – 1 | Edureka

FavoriteLoadingAdd to favorites

Take instructor-led Live class on Java Tutorial at :

Java468x60

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.

Please write back to us at support@edureka.co or call us at +91-8880862004 for more information.

Visit –

source

By |2020-01-05T01:00:06+00:00January 5th, 2020|Java Video Tutorials|22 Comments

22 Comments

  1. Amjad Khan January 5, 2020 at 1:00 am - Reply

    Thanks a lot for making it so easy

  2. vinod sagar January 5, 2020 at 1:00 am - Reply

    Very helpful and nice explanation …thanks a lot

  3. Bhoopinder Masawan January 5, 2020 at 1:00 am - Reply

    you are pretty good

  4. V PARTHASARATHY January 5, 2020 at 1:00 am - Reply

    Wonderful presentation

  5. el brigadinho January 5, 2020 at 1:00 am - Reply

    nice tutorial

  6. Ali Akbar January 5, 2020 at 1:00 am - Reply

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

  7. Pradeep Bollu January 5, 2020 at 1:00 am - Reply

    I was with an empty mind and to learn some language and get well settled can you suggest me a language bcoz I don't know any language till now from the last two years??

  8. Angkor Tech January 5, 2020 at 1:00 am - Reply

    Good video…

  9. Mahesh S R January 5, 2020 at 1:00 am - Reply

    great………….thanku soo much for sharing most valuable information

  10. Prahlada Perugu January 5, 2020 at 1:00 am - Reply

    good informative….Thank you so much…:)

  11. urScorpioLady January 5, 2020 at 1:00 am - Reply

    Great video. Thank you

  12. Farzana Shuchi January 5, 2020 at 1:00 am - Reply

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

  13. Chahoul January 5, 2020 at 1:00 am - Reply

    Keep it up!

  14. Tommy Thompson January 5, 2020 at 1:00 am - Reply

    nice one

  15. Richard Emmanuel January 5, 2020 at 1:00 am - Reply

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

  16. Akshay Tatikondalwar January 5, 2020 at 1:00 am - Reply

    eudreka = vineet
    You are Indian right?
    I want to ask some questions to you…please reply

  17. prasad C January 5, 2020 at 1:00 am - Reply

    nice i want to know how to download and operate

  18. Akash Pandey January 5, 2020 at 1:00 am - Reply

    Are this tutorial covers very basic concepts?

  19. Sherin John January 5, 2020 at 1:00 am - Reply

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

  20. Himanshu Tanwani January 5, 2020 at 1:00 am - Reply

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

  21. Code With Kris January 5, 2020 at 1:00 am - Reply

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

  22. Pavithra Pavi January 5, 2020 at 1:00 am - Reply

    Very helpful and very easy to understand

Leave A Comment

*