Java 6
Java 6
=====
Version : Java 8
JDK : 1.8
website : www.oracle.com/in/java/
Download link :
https://drive.google.com/file/d/16fr2McV_Bex0NYlOdcVfC4k2gwUUNqzq/view?
usp=share_link
step2:
------
Copy "lib" directory from java_home folder.
ex:
C:\Program Files\Java\jdk1.8.0_181\lib
step3:
-----
Paste java lib directory in environmental variables.
ex:
Right click to My PC --> properties -->
Advanced System settings --> Environmental variables -->
step4:
----
Check the environmental setup done perfectly or not.
ex:
cmd> javap
cmd> java -version
Steps to develop first application in java
============================================
step1:
-----
Make sure JDK 1.8 installed successfully.
step2:
-----
Make sure environmental setup done perfectly.
step3:
-----
Create a "javaprog" folder inside 'E' drive.
step4:
------
Open a notepad and develop Hello World program.
ex:
class Test
{
public static void main(String[] args)
{
System.out.println("Hello World");
}
}
step5:
-----
Save above program with same name as class name inside "javaprog"
folder.
step6:
-----
Open the command prompt from "javaprog" location.
step7:
------
Compile the program by using below command.
ex:
javaprog> javac Test.java
|
filename
step8:
------
Run the program by using below command.
ex:
javaprog> java Test
|
classname
1)Method Area
-----------
It contains code of a class, code of a variable and code of a method.
2)Heap
-------
Our object creations will store in heap area.
Note:
-----
Whenever JVM loads byte code instructions from .class file then it will create
method area and heap area automatically.
3)Java Stack
-------------
Java methods will store in method area but to execute those methods we required
some memory.That memory will be allocated in java stack.
4)PC Register
------------
It is a program counter register which is used to track address of an instructions.
Execution engine
-----------------
Execution engine contains interpreter and JIT compiler.
Interview Questions
===================
1)Method Area
2)Heap
3)Java Stack
4)PC Register
5)Native method stack
A method which is developed by using some other language is called native method.
It is a part of a JVM which is used to increase the execution speed of our program.
2)Extension classloader (It loads all the jar files from ext folder)