5th Day Core Java Classes
5th Day Core Java Classes
faq:
(i)JDK
(ii)JRE
ii
(iii)JVM
ath
(i)JDK:
aip
=>JDK stands for "Java Development Kit" and which is the
(b)JVM
(c)JavaLib
tes
(a)JavaCompiler:
a
nk
(b)JVM:
execute JavaByteCode.
(c)JavaLib:
ii
---------------------------------------------------------
ath
(ii)JRE:
aip
of JVM and JavaLib.
(iii)JVM:
===============================================================
Dt : 20/2/2023
a
nk
*imp
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->
==========================================================
Note:
-----------------------------------------------------------
java -version
ii
===================================================================
ath
==
*imp
faq:
aip
hM
define "class"?
Constructors.
a
=>The class in Java can be added with main() to start the program
nk
execution
Ve
variables
Methods
ii
Blocks
ath
Constructors
main()
aip
}
hM
===================================================================
class Display
{
a
nk
{
Ve
System.out.print("Welcome to Java");
----------------------------------------------------------
step-1 : Create one folder in any drive
D:\Demo145
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->
Note:
a
nk
press "enter"
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