0% found this document useful (0 votes)
45 views

5th Day Core Java Classes

(i) JDK stands for Java Development Kit and includes the Java compiler, JVM, and core Java libraries. (ii) JRE stands for Java Runtime Environment and includes just the JVM and core libraries. (iii) JVM stands for Java Virtual Machine and is used to execute Java bytecode. It is included as part of the JRE.

Uploaded by

New king India
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views

5th Day Core Java Classes

(i) JDK stands for Java Development Kit and includes the Java compiler, JVM, and core Java libraries. (ii) JRE stands for Java Runtime Environment and includes just the JVM and core libraries. (iii) JVM stands for Java Virtual Machine and is used to execute Java bytecode. It is included as part of the JRE.

Uploaded by

New king India
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Dt : 18/2/2023

faq:

wt is the diff b/w

(i)JDK

(ii)JRE

ii
(iii)JVM

ath
(i)JDK:

aip
=>JDK stands for "Java Development Kit" and which is the

collection of the following:


hM
(a)JavaCompiler

(b)JVM

(c)JavaLib
tes

(a)JavaCompiler:
a
nk

=>JavaCompiler will compile the source code and generate ByteCode

when the compilation process is successfull.


Ve

(b)JVM:

=>JVM stands for Java Virtual Machine and which is used to

execute JavaByteCode.

=>The S/w component which internally having the behaviour like


machine is known as Virtual Machine.

(c)JavaLib:

=>JavaLib will provide pre-defined and ready constructed

programming components which are used in Constructing applications.

ii
---------------------------------------------------------

ath
(ii)JRE:

=>JRE stands for Java Runtime Environment and which is collection

aip
of JVM and JavaLib.

=>JRE is an internal partition of JDK


hM
------------------------------------------------------------

(iii)JVM:

=>JVM internal partition of JRE


tes

===============================================================

Dt : 20/2/2023
a
nk

*imp

Installing Java s/w and Setting path:


Ve

step-1 : Download Java S/w(JDK) from Oracle WebSite

Link => https://www.oracle.com/in/java/technologies/downloads/


step-2 : Install JDK

Note:

=>After Installation process we can find one folder with name "java" in

programfiles

ii
C:\Program Files\Java

ath
step-3 : Set Java path in "Environment variables"

aip
RightClick on MyComputer(this pc)->Properties->Advanced System Settings->

Environment Variables,click new from "System variables"


hM
Variable name : path
tes

Variable value : C:\Program Files\Java\jdk-17.0.4.1\bin;


a
nk

step-4 : Click "ok" for three times


Ve

==========================================================

Note:

=>Open CommandPrompt and check the following Commands are working or


not
javac - Compilation Commmand

java - Execution Command

-----------------------------------------------------------

=>Use the following syntax in CommandPrompt to know the Version:

java -version

ii
===================================================================

ath
==

*imp

Writing,Saving,Compiling and Execution Java program:

faq:
aip
hM
define "class"?

=>"class" is a "Structured Layout" generating "Objects".


tes

=>class in Java is a Collection of Variables,Methods,Blocks and

Constructors.
a

=>The class in Java can be added with main() to start the program
nk

execution
Ve

=>main() is having the following pre-defined standard syntax:

public static void main(String args[])

=>we use "class" keyword in Java to construct classes

structure of class in Java:


class Class_name

variables

Methods

ii
Blocks

ath
Constructors

main()

aip
}
hM
===================================================================

Ex-program : Wap to display the msg as "Welcome to Java"?


tes

class Display

{
a
nk

public static void main(String args[])

{
Ve

System.out.print("Welcome to Java");

----------------------------------------------------------
step-1 : Create one folder in any drive

D:\Demo145

step-2 : Open notepad and type the program

ii
step-3 : Save the program in folder with language-extension

ath
syntax:

Class_name.java

aip
Ex:

Display.java
hM
Click on File->Save->Browse and select the folder->name the file->

Save as type must be "All Files"->Click "Save"


tes

Note:
a
nk

=>Open CommandPrompt and perform Compilation and Execution process


Ve

To open CommandPrompt,goto folder->type "cmd" in Addressbar and

press "enter"

step-4 : Compile the program as follows

syntax:
javac Class_name.java

Ex:

javac Display.java

ii
step-5 : Execute the program as follows

ath
syntax:

java Class_name

aip
Ex:

java Display
hM
===================================================================
====
a tes
nk
Ve
Ve
nk
ates
hM
aip
ath
ii

You might also like