Programming in Java
Java Basics
By
Ravi Kant Sahu
Asst. Professor, LPU
Contents
• Features of Java
• Java Platform Overview
Ravi Kant Sahu, Asst. Professor @ Lovely Professional University, Punjab (India)
Features of Java
• Java Is Simple
• Java Is Object-Oriented
• Java Is Distributed
• Java Is Interpreted
• Java Is Robust
• Java Is Secure
• Java Is Architecture-Neutral
• Java Is Portable
• Java's Performance
• Java Is Multithreaded
• Java Is Dynamic
Ravi Kant Sahu, Asst. Professor @ Lovely Professional University, Punjab (India)
Portability Vs
Platform-Independence
• What is the difference between portability and
platform-independence?
• How Java is Platform-independent?
Ravi Kant Sahu, Asst. Professor @ Lovely Professional University, Punjab (India)
Portability Vs Platform-Independence
Portability focuses on adaptation of software in
various OS, by recompiling the source to make the
binary compatible with the target OS and not
necessarily modifying the source.
Platform independence focuses on ability of software
to run on VIRTUAL hardware that in turn interfaces
with the PHYSICAL hardware.
Ravi Kant Sahu, Asst. Professor @ Lovely Professional University, Punjab (India)
How Java is Platform-Independent?
Ravi Kant Sahu, Asst. Professor @ Lovely Professional University, Punjab (India)
Java Security
• How Java is Secure?
Ravi Kant Sahu, Asst. Professor @ Lovely Professional University, Punjab (India)
Java Security
• Java programs run inside a virtual machine i.e. JVM.
• Java does not support explicit pointer.
• Byte-code verifier checks the code fragments for illegal code
that can violate access right to object.
• It provides [Link] package implements explicit security.
• Run-time security check takes place when we load new code.
Ravi Kant Sahu, Asst. Professor @ Lovely Professional University, Punjab (India)
Java Platform Overview
• How will you differentiate JDK, JRE and JVM?
Ravi Kant Sahu, Asst. Professor @ Lovely Professional University, Punjab (India)
Java Platform Overview
Ravi Kant Sahu, Asst. Professor @ Lovely Professional University, Punjab (India)
JVM Architecture
Ravi Kant Sahu, Asst. Professor @ Lovely Professional University, Punjab (India)