Professional Documents
Culture Documents
Introduction To Core Java PDF
Introduction To Core Java PDF
Email: info@psktechnologies.co.in
Website: https://www.pskitservices.com
❖ Platform Independent
❖ Architectural Neutral
❖ Portable
❖ Multi-Threading
❖ Distributed
❖ Networked
❖ Robust
❖ Secured
❖ High Performance
❖ Object Oriented
❖ Robust
❖ Object Oriented
Java supports Inheritance, encapsulation and
polymorphism, the three major Object Oriented
constructs that distinguish a language as Object-
Oriented.
❖ JRE
➢ What is JVM?
It is:
A specification where working of Java Virtual Machine
is specified. But implementation provider is independent
to choose the algorithm. Its implementation has been
provided by Sun and other companies.
• Loads code
• Verifies code
• Executes code
• Memory area
• Register set
• Garbage-collected heap
3. Heap:
It is the runtime data area in which objects are allocated.
4. Stack:
Java Stack stores frames. It holds local variables and
partial results, and plays a part in method invocation and
return.
Each thread has a private JVM stack, created at the same
time as thread.
A new frame is created each time a method is invoked. A
frame is destroyed when its method invocation
completes.
5. Program Counter Register:
PC (program counter) register. It contains the address of
the Java virtual machine instruction currently being
executed.
1. A virtual processor
2. Interpreter: Read byte code stream then execute the
instructions.
3. Just-In-Time (JIT) compiler: It is used to improve the
performance
4. Just-In-Time (JIT) compiler: JIT compiles parts of the
byte code that have similar functionality at the same
time, and hence reduces the amount of time needed for
compilation. Here the term? Compiler? Refers to a
translator from the instruction set of a Java virtual
machine (JVM) to the instruction set of a specific CPU.
➢ Variable
1. Local Variable
A variable that is declared inside the method is called
local variable.
2. Instance Variable
A variable that is declared inside the class but
outside the method is called instance
variable. It is not declared as static.
3. Static variable
A variable that is declared as static is called static
variable. It cannot be local.
1. class A{
4. void method(){
6. }
7. }
Name Convention
Class name Should start with uppercase letter and be a noun
E.g. String , color Button, System, Thread etc.
Interface name should start with uppercase letter and be an adjective
e e.g. Runnable, Remote, Action Listener etc.
Method name Should start with lowercase letter and be a verb e.g.
action Performed(), main(), print(), println() etc.
Variable name should start with lowercase letter e.g. first Name, order
Number etc.
Package name Should be in lowercase letter e.g. java, Lang, sql, until
etc.
Constants name Should be in uppercase letter. e.g. RED, YELLOW,
MAX_PRIORITY etc.
FOLLOW US ON: