Introduction to Java
1. High-Level Languages
Category Description Examples
Procedural Language Program divided into functions; step-by-step C, Perl, VB, FORTRAN,
execution; follows Top-Down approach; data moves Pascal
function to function.
Object-Oriented Program divided into objects; deals with data; follows C++, Java, VB.NET,
Language Bottom-Up approach; objects communicate via C#.NET
member functions.
2. POP vs OOP — Comparison
Procedural Oriented Programming (POP) Object Oriented Programming (OOP)
Program divided into small parts called functions. Program divided into parts called objects.
Importance given to functions and sequence of actions Importance given to data rather than procedures
— not data. (models real world).
Follows Top-Down approach. Follows Bottom-Up approach.
Data moves freely from function to function. Objects communicate through member functions.
Adding new data and functions is difficult. Adding new data and functions is easy.
Global data accessible by any function — risk of Data is hidden; accessible only through the object's
accidental modification. own methods.
Examples: C, VB, FORTRAN, Pascal. Examples: C++, Java, VB.NET, C#.NET.
3. Introduction to Java
Java is a high-level, object-oriented programming language developed by James Gosling and Patrick
Naughton. Java combines both compilation and interpretation in a two-stage system:
• Source code is compiled by the Java Compiler into bytecode (.class files).
• Bytecode is interpreted by the JVM into machine code, which is directly executed.
• This makes Java platform-independent — Write Once, Run Anywhere.
4. Java Architecture & Components
Compo Full Name Role
nent
JDK Java Development Kit Full development environment: JRE + compiler (javac), archiver (jar),
javadoc, and other tools.
JRE Java Runtime Runtime for executing Java programs: JVM + Library Classes. JRE =
Environment JVM + Library Classes.
JVM Java Virtual Machine Interprets bytecode into machine code and executes it.
Platform-dependent. JDK = JRE + Dev Tools.