2. How Java Program Works and its 3 Important Components (JVM, JRE and JDK) with Example

  Рет қаралды 26,933

Concept && Coding - by Shrayansh

Concept && Coding - by Shrayansh

Күн бұрын

➡️ Notes link: Shared in the Member Community Post (If you are Member of this channel, then pls check the Member community post, i have shared the Notes link there)
➡️ Join this channel to get access to member only perks:
/ @conceptandcoding
In this video, i explained in detail about the 3 important components of Java:
- JVM (Java Virtual Machine)
- JRE (Java Runtime Environment)
- JDK ( Java Development Kit)
I also explained, from where to download the Java.
You will also get information about :
- JSE (Java Standard Edition)
- JEE ( Java Enterprise Edition)
- JME (Java Micro Edition)
And at last we will write our FIRST JAVA PROGRAM and will set how it works.
#java #objectorientedprogramming #firstjavaprogram

Пікірлер: 48
@ankitshaw_3060
@ankitshaw_3060 7 ай бұрын
If any one wants to know why main method is void so the short answer is because it does not return anything but if you want to know in depth about why main method in java returns void but in C/C++ it returns 0, then this is the reason behind it :- The C and C++ program which return int from main method are processes of operating system . The int value returned from the main in C and C++ is exit code or exit status. Exit Code 0 --> means successful termination Exit Code non-zero ---> indicates an error The parent process of any child process keeps waiting for the exit status of the child and after receiving that exit status of child it clears up the child process from the process table and free the resources allocated to it . That is why it becomes mandatory for C and C++ program to pass their exit status . However, the java program runs as a main thread in JVM. The java program is not even a process of operating system directly this is why main method of java is not designed to return an exit status. However, JVM is a process of Operating system and JVM can be terminated with a certain exit status with help of System.exit(int status).
@jupitertheinvincible7998
@jupitertheinvincible7998 7 ай бұрын
Thank you for sharing!
@thecoderstv22
@thecoderstv22 5 ай бұрын
www.youtube.com/@thecoderstv22
@sandeepkosta5750
@sandeepkosta5750 Ай бұрын
Thanks a ton for sharing this.
@grrlgd3835
@grrlgd3835 Ай бұрын
excellent. great teaching
@abhijittalukdar9429
@abhijittalukdar9429 Жыл бұрын
undeerstood clearly.
@ashishshandilya2286
@ashishshandilya2286 Жыл бұрын
I am working from rival for PayPal, which until now written core components in c++, with influx from folks from PayPal we are now moving to Microservices. Hence forced to learn java and spring.Hope this one will ramp me up. :(. Thanks for the content.
@ConceptandCoding
@ConceptandCoding Жыл бұрын
It will for sure buddy
@leviuzumaki5059
@leviuzumaki5059 4 ай бұрын
Nice
@priyam86f
@priyam86f 9 ай бұрын
Thankyou so much for this series. Why i am learning from you and not the big channels, because I see that experienced engineer in you,which even i look forward to be in the future. I believe, knowledge with experience is something really amazing. Currently preparing for my on-campus placements and this series is really helping. Just a question, if i buy your membership, are more JAVA videos available there? thanks.
@ConceptandCoding
@ConceptandCoding 9 ай бұрын
hi Priyam, with just 159rs, the whole playlist will get open, till now uploaded 28 videos of in depth java, and more going to add soon.
@chethannaik6333
@chethannaik6333 7 ай бұрын
Hi priyam can you suggest good KZbin channel for operating system, dbms and web development.
@Badalkumar-me9ok
@Badalkumar-me9ok 22 күн бұрын
How to get the .class file from a .java file in eclipse
@soumyasatish7941
@soumyasatish7941 6 ай бұрын
Hi Shreyansh, which ide are you using in this video? Can you recommend an IDE for Windows?
@ConceptandCoding
@ConceptandCoding 6 ай бұрын
intellij is best
@knowledgeascend
@knowledgeascend Жыл бұрын
Hey Srayansh, Great video. Just a small query, does JRE contains bytecode of class libraries or will the java code contained in them will be converted to Byte code by java compiler ?
@ConceptandCoding
@ConceptandCoding Жыл бұрын
Those libraries are already compiled and have .class files also. JVM does the linking and use them.
@knowledgeascend
@knowledgeascend Жыл бұрын
Understood , Thanks!
@akarshkumarsrit2518
@akarshkumarsrit2518 11 ай бұрын
if my code doesnt use any java lib it would just need jvm to run right ?
@ConceptandCoding
@ConceptandCoding 11 ай бұрын
Yup
@singhji4149
@singhji4149 10 ай бұрын
For LLD WILL U ADD VIDEOS OF PAYMENTS APP AND FOODING APPS( ZOMATO SWIGGY DESIGN)
@ConceptandCoding
@ConceptandCoding 10 ай бұрын
yes i will.
@fv5895
@fv5895 Жыл бұрын
Nice lecture dude. One question: if JVM reads the code line by line and converts to machine code( which is a definition of an interpreter ), could you tell why is it called "Just in time compiler".
@ConceptandCoding
@ConceptandCoding Жыл бұрын
Good question buddy: Let me try to explain: Generally JVM convert the bytecode to machine code using Interpretor. But internally JVM also maintains the counter for each method, and once it identifies that's particular method is called very frequently, it passes that method to JIT(just in time compiler). JIT has capability to do certain optimization (like removing dead code etc ) and another capability is Reusing of frequently used method machine code (not need to interpret again and again). So it helps in increasing the performance of JVM a lot and hence name JIT :) Hope it clear or we can discuss more
@fv5895
@fv5895 Жыл бұрын
@@ConceptandCoding its clear :-). Thank you
@vallabhchugh2075
@vallabhchugh2075 3 ай бұрын
good question. we need more such
@sambhav07
@sambhav07 Ай бұрын
If jre already has class libraries then what is meant by "jdk has programming language"? jdk has compiler and debugger and that is a valid point but not able to understand difference between class libraries in jre and programming language in jdk?
@ConceptandCoding
@ConceptandCoding Ай бұрын
umm, Programming Language (Java), Refers to the syntax, semantics, and core libraries used to write Java applications. The JDK provides the tools to write (using the language), compile, and debug Java code.
@suryaprakash7980
@suryaprakash7980 6 ай бұрын
bro, pls put a specific videos about jar, war and ear files
@ConceptandCoding
@ConceptandCoding 5 ай бұрын
ack
@pleasantdayNwisdom
@pleasantdayNwisdom 7 ай бұрын
Video 5 learning continues
@sumitbasu5146
@sumitbasu5146 Жыл бұрын
Hi Srayansh, may be it is not a valid question but still let me ask it. If the jvm converts the bytecode to machine code and cpu will execute the machine code, then how JVM invokes/calls the main method at runtime? It should be CPU that calls the main method r8?
@ConceptandCoding
@ConceptandCoding Жыл бұрын
Hi Sumit, Machine code is in binary form 0 and 1. CPU do not understand high level language or bytecode. It understand sequence of instructions in binary form 0 and 1. So calling main method is not possible for CPU as all instructions it's in 0 and 1 only.
@sumitbasu5146
@sumitbasu5146 Жыл бұрын
My doubt is machine code will execute finally to display the output then at runtime with the machine code level why we are talking about "JVM will invoke the main method "?
@ConceptandCoding
@ConceptandCoding Жыл бұрын
@@sumitbasu5146 sorry did not get it. Jvm is the one which invoke main method at Runtime and convert it to machine code (0 and 1) which CPU will execute directly.
@sumitbasu5146
@sumitbasu5146 Жыл бұрын
Now I got it..Thank you so much 👍
@knowledgeascend
@knowledgeascend Жыл бұрын
@@sumitbasu5146 JVM interprets bytecode line by line and converts it to machine code for execution, thus JVM calls main method, converts it into machine code and passes to cpu for execution.
@ManishVerma-si8nv
@ManishVerma-si8nv 11 ай бұрын
Hello Shrayansh, I have one doubt...If I have written a program in Java and wants to run it in a mobile phone...does the phone require JVM or JRE ???
@ConceptandCoding
@ConceptandCoding 11 ай бұрын
There are Java emulator software you need buddy, through which you can run Java code on phone
@vyankateshkulkarni4374
@vyankateshkulkarni4374 10 ай бұрын
in JRE , jvm will be there. you need JRE only to run bytecode
@arishsheikh3000
@arishsheikh3000 5 ай бұрын
Please add exception handling
@ConceptandCoding
@ConceptandCoding 5 ай бұрын
already there in the playlist
@akhilbhatia7211
@akhilbhatia7211 6 ай бұрын
can i have notes of these lecture for quick interview revision ?
@ConceptandCoding
@ConceptandCoding 6 ай бұрын
i will try to add in description section
@thecoderstv22
@thecoderstv22 5 ай бұрын
www.youtube.com/@thecoderstv22
@yogendramaurya1741
@yogendramaurya1741 11 ай бұрын
Started today, let's see how far I go.🤞
@ConceptandCoding
@ConceptandCoding 11 ай бұрын
Happy Learning
@anishkr7888
@anishkr7888 Жыл бұрын
Hi Anish here. Done with this video
3. Quiz Question: Why only 1 Public Class in JAVA file
6:16
Concept && Coding - by Shrayansh
Рет қаралды 16 М.
9. Java Memory Management and Garbage Collection in Depth
48:48
Concept && Coding - by Shrayansh
Рет қаралды 57 М.
Best father #shorts by Secret Vlog
00:18
Secret Vlog
Рет қаралды 22 МЛН
What it feels like cleaning up after a toddler.
00:40
Daniel LaBelle
Рет қаралды 69 МЛН
1. OOPs Concept in Java with Examples | 4 Pillars of Object Oriented Programming (OOPs)
1:36:42
Concept && Coding - by Shrayansh
Рет қаралды 53 М.
What is the difference between JDK,JRE and JVM
6:28
Durga Software Solutions
Рет қаралды 505 М.
Scientific Concepts You're Taught in School Which are Actually Wrong
14:36
JVM ( java virtual machine) architecture - tutorial
29:16
Ranjith ramachandran
Рет қаралды 512 М.
How I would learn Leetcode if I could start over
18:03
NeetCodeIO
Рет қаралды 355 М.
#23 JDK JRE JVM in Java
5:22
Telusko
Рет қаралды 214 М.
Differences between JDK, JRE, JVM and JIT | Core Java Tutorial | Mr. Hari Krishna
9:32