Skip to main content
  1. Resources/
  2. Study Materials/
  3. Information & Communication Technology Engineering/
  4. ICT Semester 4/
  5. Java Programming (4343203)/

5 mins· ·
Milav Dabgar
Author
Milav Dabgar
Experienced lecturer in the electrical and electronic manufacturing industry. Skilled in Embedded Systems, Image Processing, Data Science, MATLAB, Python, STM32. Strong education professional with a Master’s degree in Communication Systems Engineering from L.D. College of Engineering - Ahmedabad.
Lecture 01 - Java Introduction & History

Java Programming

Lecture 01: Introduction & History

Course: 4343203 - Java Programming

GTU Semester 4 | Unit 1


Learning Objectives:

  • Understand Java's history and evolution
  • Learn key features and platform independence
  • Explore Java applications and ecosystems
  • Understand "Write Once, Run Anywhere" philosophy

What is Java?

Java is a high-level, class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible.

Key Characteristics:

  • Platform Independent
  • Object-Oriented
  • Robust & Secure
  • Multithreaded
  • High Performance
  • Dynamic

Philosophy:

"Write Once, Run Anywhere"

WORA - This means that compiled Java code can run on all platforms that support Java without the need for recompilation.

Java History & Evolution

1991: Project started by James Gosling at Sun Microsystems as "Oak"
1995: Public release as "Java" - Java 1.0 (JDK 1.0)
1997: Java 1.1 - Inner classes, JavaBeans, JDBC, RMI
1998: Java 2 (J2SE 1.2) - Collections Framework, Swing
2000: J2SE 1.3 - HotSpot JVM, JNDI
2002: J2SE 1.4 - Regular expressions, NIO, Logging API
2004: Java 5 (J2SE 1.5) - Generics, Annotations, Enums
2006: Java 6 (Java SE 6) - Performance improvements, Web Services

Modern Java Evolution

2010: Oracle acquires Sun Microsystems
2011: Java 7 - Try-with-resources, Diamond operator
2014: Java 8 - Lambda expressions, Stream API, Default methods
2017: Java 9 - Module system, JShell
2018-Present: 6-month release cycle (Java 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21...)

Current Status: Java 21 is the latest LTS (Long Term Support) version as of 2023

Key Java Features

1. Platform Independence

  • Bytecode compilation
  • JVM abstraction layer
  • No platform-specific code

2. Object-Oriented

  • Everything is an object
  • Encapsulation, Inheritance, Polymorphism
  • Abstraction support

3. Robust & Secure

  • Strong memory management
  • Exception handling
  • No pointer arithmetic
  • Bytecode verification

4. Multithreaded

  • Built-in threading support
  • Synchronized methods
  • Thread-safe operations

5. High Performance

  • Just-In-Time (JIT) compilation
  • Optimized bytecode execution
  • Garbage collection

6. Dynamic & Distributed

  • Dynamic loading of classes
  • Network-aware
  • RMI, Web Services support

Java Application Domains

Enterprise Applications

  • Banking systems (ICICI, HDFC)
  • E-commerce platforms (Amazon, eBay)
  • ERP systems (SAP, Oracle)
  • Government applications

Web Development

  • Server-side development
  • Spring Framework applications
  • RESTful web services
  • Microservices architecture

Mobile Development

  • Android applications
  • Mobile enterprise apps
  • Cross-platform solutions

Big Data & Analytics

  • Apache Hadoop ecosystem
  • Apache Spark
  • ElasticSearch
  • Apache Kafka

Desktop Applications

  • Swing/JavaFX GUIs
  • IDEs (NetBeans, Eclipse, IntelliJ)
  • Cross-platform desktop apps

Java Ecosystem

Java Platform Architecture

Development Tools:

  • IDEs: IntelliJ IDEA, Eclipse, NetBeans
  • Build Tools: Maven, Gradle, Ant
  • Testing: JUnit, TestNG, Mockito

Frameworks:

  • Spring: Dependency Injection, Web MVC
  • Hibernate: ORM framework
  • Apache Struts: Web framework

Why Learn Java?

Industry Demand

  • #1 programming language for enterprise
  • High-paying job opportunities
  • 3+ billion devices run Java
  • Large developer community

Learning Benefits

  • Strong OOP foundation
  • Platform independence skills
  • Memory management understanding
  • Multithreading expertise

Career Paths

  • Backend Developer
  • Full-Stack Developer
  • Android Developer
  • Big Data Engineer
  • DevOps Engineer
  • Architect

Average Salary: ₹4-15 LPA for freshers in India

Previous Year Exam Questions

Q1. (GTU Summer 2022) Explain the features of Java programming language with suitable examples.

Solution:

1. Platform Independence: Java programs are compiled into bytecode, which runs on JVM. Same .class file runs on Windows, Linux, macOS.

// HelloWorld.java compiles to HelloWorld.class
// Runs on any platform with JVM installed

2. Object-Oriented: Everything is treated as an object.

class Student {
    private String name;    // Encapsulation
    public String getName() { return name; }  // Method
}

3. Robust: Strong memory management and exception handling.

try {
    int result = 10/0;  // Runtime exception handled
} catch(ArithmeticException e) {
    System.out.println("Division by zero!");
}

Q2. (GTU Winter 2021) Compare Java with C++ programming language.

Solution - Java vs C++ Comparison:

FeatureJavaC++
PlatformPlatform IndependentPlatform Dependent
Memory ManagementAutomatic (Garbage Collection)Manual (new/delete)
PointersNo explicit pointersSupports pointers
InheritanceSingle inheritance onlyMultiple inheritance
CompilationBytecode (.class)Machine code (.exe)

Q3. (GTU Summer 2020) Write a short note on "Write Once, Run Anywhere" concept of Java.

Solution:

"Write Once, Run Anywhere" (WORA) is Java's key philosophy that enables platform independence.

How WORA Works:

  1. Source Code: Written in .java files
  2. Compilation: javac compiles to bytecode (.class files)
  3. Execution: JVM interprets bytecode on any platform
HelloWorld.java → javac → HelloWorld.class → JVM → Output
                                   (Platform Independent Bytecode)

Benefits:

  • Cost-effective development
  • Reduced time-to-market
  • Wide platform reach
  • Maintenance efficiency

Example: A Java banking application developed on Windows can run on Linux servers and macOS development machines without any code changes.

Lecture Summary

Key Concepts Covered:

  • Java definition and philosophy
  • Historical evolution from Oak to Java 21
  • Platform independence (WORA)
  • Core features and characteristics
  • Application domains and ecosystem

Learning Outcomes Achieved:

  • ✅ Understand Java's history and evolution
  • ✅ Comprehend platform independence
  • ✅ Identify Java's key features
  • ✅ Recognize Java application areas
  • ✅ Compare Java with other languages

Next Lecture: Java Environment Setup & First Program

Topics: JDK installation, IDE setup, Hello World program, compilation process

Assignment & Lab Work

Lab Exercise 1:

  1. Research and create a timeline of Java versions with major features
  2. Identify 5 real-world applications built with Java
  3. Compare Java with one other programming language (Python/C#)
  4. Prepare a presentation on "Why Java for Enterprise Development?"

Assignment Questions:

  1. Explain how Java achieves platform independence with a detailed diagram.
  2. Discuss the role of JVM in Java's "Write Once, Run Anywhere" philosophy.
  3. Compare Java with C++ and Python in terms of features and use cases.
  4. Research and write about Java's role in modern big data technologies.

Preparation for Next Lecture:

  • Download and install JDK from Oracle or OpenJDK
  • Install an IDE (VS Code, IntelliJ IDEA Community, or Eclipse)
  • Verify Java installation using command line

Thank You!

Questions & Discussion


Next: Lecture 02 - Java Environment Setup & First Program


Course: 4343203 Java Programming
Unit 1: Introduction to Java
GTU Semester 4