Ja 2
Ja 2
faq:
(i)JDK
(ii)JRE
i
(iii)JVM
thi
(i)JDK:
ipa
=>JDK stands for 'Java Development Kit' and which internally having the
following components:
(a)Java Compiler
Ma
(b)JVM
sh
(c)Java Library
ate
(a)Java Compiler:
nk
=>Java Compiler will check the program constructed according to the rules
(b)JVM:
=>JVM stands for 'Java Virtual Machine' and which is used to execute
faq:
define Virtual Machine?
=>The S/w program which internally having behaviour like machine is known
as Virtual Machine.
(c)Java Library:
i
=>Java Library will provide pre-defined ready constructed programming
thi
components(Java Alphabets) used in application development.
ipa
=>JavaLibrary is collection of "packages"
Ma
=>Packages are collection of "Classes and Interfaces"
--------------------------------------------------------------------
sh
(ii)JRE:
ate
=>JRE stands for 'Java Runtime Environment' and which internally having
------------------------------------------------------------------
Ve
(iii)JVM:
===================================================================
=====
*imp
Installing Java S/w(JDK) and Setting path:
i
step-2 : Install JDK
thi
Note:
ipa
name "java" in "ProgramFiles" of C-drive
C:\Program Files\Java
Ma
Step-3 : Set JavaPath in "Environment Variables"
sh
ate
=================================================================
Dt : 14/7/2023
*imp
i
define "class"?
thi
=>"class" is a 'Structured Layout' in Java and which generate 'Objects'.
ipa
main().
Ma
=>main() is the starting point of program execution and which is having
class Class_name
{
//variables
//methods
//Blocks
//Constructors
i
//main()
thi
}
ipa
Coding Rule : class_names in Java must be started with UpperClass or Capital
letter.
Ma
------------------------------------------------------------------
Ex-program-1 :
sh
Wap to display the msg as "Welcome to Java"?
ate
class Display
nk
System.out.print("Welcome to Java");
------------------------------------------------------
step-1 : Create one folder in any drive of ComputerSystem to save the
programs
D:\Demo148
i
step-3 : Save the program with language extention as follows:
thi
syntax:
Class_name.java
ipa
Ex:
Display.java
Ma
To Save the program,click on File->Save->Browse the folder->name the file->
Note:
enter.
Ve
syntax:
javac Class_name.java
Ex:
javac Display.java
syntax:
java Class_name
i
Ex:
thi
java Display
===================================================================
ipa
==
Ma
sh
ate
nk
Ve