📘LESSON 2
3.1 Lesson Outcomes
After completing this lesson, learners will be able to:
- Define Java programming.
- Explain the history and evolution of Java.
- Identify uses of Java programming.
- Explain the Java platform and its components.
- Differentiate between source code and machine code.
- Identify Java basic syntax structures.
- Explain the purpose of Eclipse IDE and Java projects.
3.2 Overview
Java is one of the world’s most widely used programming languages and is commonly used in enterprise systems, web applications, Android applications, and software development environments.
This lesson introduces learners to Java programming and explains the history, uses, platform structure, syntax, and development tools used in Java software development.
Java is widely used in:
- banking systems,
- enterprise applications,
- Android development,
- cloud computing,
- and web systems.
Understanding Java programming is important because Java is widely used in modern software engineering and enterprise development.
KT0201 — Definition of Java
Java is a:
- high-level,
- object-oriented,
- platform-independent programming language.
Java was designed to allow developers to:
- write programs once,
- and run them on multiple operating systems.
Characteristics of Java
Java is:
- secure,
- robust,
- portable,
- and multithreaded.
Importance of Java
Java supports:
- software development,
- enterprise systems,
- mobile applications,
- and web applications.
KT0202 — Java History and Evolvement
Java was developed by:
James Gosling
at Sun Microsystems during the early 1990s.
Java was originally called:
Oak
before being renamed Java.
Java Evolution
| Year | Development |
|---|---|
| 1991 | Java project started |
| 1995 | Official Java release |
| Present | Enterprise and cloud adoption |
Importance of Java Evolution
Java evolution improved:
- portability,
- security,
- scalability,
- and enterprise support.
KT0203 — Java Uses
Java is used to develop:
- desktop applications,
- web applications,
- enterprise systems,
- and Android applications.
Examples of Java Uses
| Area | Example |
|---|---|
| Banking | ATM systems |
| Mobile Development | Android apps |
| Enterprise Systems | ERP systems |
| Web Applications | Online banking |
Importance of Java Uses
Java supports:
- large-scale applications,
- secure systems,
- and enterprise software environments.
KT0204 — Java Platform
The Java platform is the environment used to:
- develop,
- compile,
- and execute Java programs.
Java supports:
Write Once, Run Anywhere (WORA)
Components of the Java Platform
| Component | Purpose |
|---|---|
| JDK | Development tools |
| JVM | Executes Java bytecode |
| JRE | Runtime environment |
Importance of the Java Platform
The Java platform supports:
- portability,
- software execution,
- and cross-platform compatibility.
KT0205 — Java Features
Java contains several features that make it suitable for software development.
Main Java Features
| Feature | Description |
|---|---|
| Platform Independent | Runs on different systems |
| Object-Oriented | Uses classes and objects |
| Secure | Provides security mechanisms |
| Robust | Handles errors effectively |
| Multithreaded | Supports concurrent tasks |
Importance of Java Features
Java features improve:
- application reliability,
- portability,
- security,
- and scalability.
KT0206 — Source Code vs Machine Code
Source code is human-readable programming code written by developers.
Machine code is binary code executed by computers.
Source Code Example
System.out.println("Hello");
Machine Code Example
101010101010
Comparison
| Source Code | Machine Code |
|---|---|
| Human-readable | Computer-readable |
| Written by programmers | Executed by processors |
| Easier to understand | Binary format |
Importance of Source Code and Machine Code
Understanding source code and machine code helps learners understand:
- compilation,
- program execution,
- and software processing.
KT0207 — Components of Java Platform and Respective Uses (JDK, JVM, JRE)
Java programs use several platform components during development and execution.
JDK — Java Development Kit
The JDK contains:
- development tools,
- compiler,
- and libraries.
The JDK is used to:
- write,
- compile,
- and develop Java applications.
JVM — Java Virtual Machine
The JVM executes Java bytecode.
The JVM allows Java programs to run on different operating systems.
JRE — Java Runtime Environment
The JRE provides:
- libraries,
- JVM,
- and runtime support
required to run Java applications.
Comparison of Components
| Component | Purpose |
|---|---|
| JDK | Development |
| JVM | Program execution |
| JRE | Runtime environment |
Importance of Java Platform Components
These components support:
- Java development,
- compilation,
- and execution.
KT0208 — Java Basic Syntax
Java syntax refers to the rules used when writing Java programs.
Basic Java Syntax Example
public class Main {
public static void main(String[] args) {
System.out.println("Hello World");
}
}
Basic Syntax Elements
| Element | Purpose |
|---|---|
| class | Defines a class |
| main() | Entry point |
| System.out.println() | Displays output |
| {} | Code block |
Importance of Java Syntax
Java syntax ensures:
- correct program structure,
- successful compilation,
- and readable code.
KT0209 — Introduction to Eclipse
Eclipse is an Integrated Development Environment (IDE) used for Java programming.
Eclipse provides tools for:
- writing code,
- debugging,
- compiling,
- and managing Java projects.
Features of Eclipse
| Feature | Purpose |
|---|---|
| Code Editor | Writing code |
| Debugger | Finding errors |
| Project Explorer | Managing projects |
| Auto-completion | Faster coding |
Importance of Eclipse
Eclipse improves:
- productivity,
- debugging,
- and software development efficiency.
KT0210 — What is a New Java Project
A Java project is a structured collection of:
- Java files,
- packages,
- libraries,
- and resources.
A new Java project provides an organized environment for software development.
Components of a Java Project
| Component | Purpose |
|---|---|
| src Folder | Stores source code |
| Libraries | External dependencies |
| Packages | Organizes classes |
| Class Files | Program classes |
Importance of Java Projects
Java projects support:
- organized development,
- project management,
- and software maintenance.
3.5 Key Notes / Summary
- Java is a platform-independent programming language.
- Java was developed by Sun Microsystems.
- Java is used in enterprise, web, and mobile applications.
- The Java platform includes JDK, JVM, and JRE.
- Source code is human-readable code.
- Machine code is computer-readable binary code.
- Eclipse is a Java development IDE.
- Java projects organize software development resources.