Introduction to Java: Introduction to java + JDK+ Memory Management
1_ Introduction to JavaScript - SYNC (1 Hout 40 minutes)
Topic
Learning ● Describe the Java programming language and its characteristics.
Objectives ● Understand the Java Virtual Machine (JVM), its architecture, and core
components.
● Demonstrate the process of compiling and running a Java program.
● Differentiate between JVM, JDK, and JRE.
● Explain Java memory management and garbage collection.
Performan ● Apply coding best practices to execute Java tasks.
ce Goals ● Proactively explore new technical concepts to enhance performance and
readiness for promotion.
Instructor
Prep ● Review Introduction to Java concepts.
● Prepare technical questions to assess participants’ understanding.
● Organize breakout groups based on participant numbers.
Materials ● PowerPoint slides on Java concepts.
● IDE setup guide (e.g., IntelliJ IDEA, Eclipse, or VS Code).
Assessme ● Assessment questions for Check for Understanding (CFU).
nt
Time Activity
10 mins OPENING
Activity: Energizer/Quick Poll
● Ask participants:
○ “Have you ever worked with any programming languages
before?”
○ “What do you know about Java?”
Review Learning Objectives
● Highlight the goals for today’s session.
● Outline the session agenda:
○ Introduction to Java and its characteristics.
○ JVM Architecture and Execution Engine.
○ Compiling and Running Java Programs.
○ JVM Languages, JDK, and JRE.
○ Java Memory Management and Garbage Collection.
60 mins CONTENT & PRACTICE
Part 1: Introduction to Java and Its Key Features (10 mins)
● Define Java and its characteristics:
○ Object-oriented, platform-independent, secure, robust, and multi-
threaded.
● Discuss key features:
○ Write Once, Run Anywhere (WORA).
○ Automatic memory management.
○ Rich API and built-in libraries.
Activity:
● Show sample Java code:
Part 2: Understanding the Java Virtual Machine (JVM) (15 mins)
● Define JVM and its purpose.
● JVM Architecture Overview:
○ Class Loader
○ Execution Engine
○ Native Interface
○ Memory Areas
● Garbage Collection:
○ Explain automatic memory management in JVM.
Activity:
● Using a diagram to explain JVM architecture.
Part 3: Compiling and Running a Java Program (10 mins)
● Explain the compilation and execution process:
○ .java → Compilation → .class (bytecode) → JVM Execution.
● Demonstrate compiling and running a Java program using:
○ Command Line (javac and java commands).
○ IDE (IntelliJ, Eclipse, etc.).
Activity:
● Run a simple Java program live.
Part 4: JVM Languages (5 mins)
● Discuss other JVM-compatible languages:
○ Kotlin, Scala, Groovy, etc.
Part 5: Java Development Kit (JDK) and Java Runtime Environment (JRE) (10
mins)
● Differentiate between JDK, JRE, and JVM.
● JDK: Development tools, compiler, debugger.
● JRE: JVM and libraries for running Java applications.
Activity:
● Show directory structure of JDK and JRE.
Part 6: Java Memory Management and Garbage Collection (10 mins)
● Explain memory management in Java:
○ Stack, Heap, Method Area.
● Discuss types of garbage collectors:
○ Serial, Parallel, CMS, G1.
25 mins CFU
Activity: Technical Questions
● Sample questions:
1. What is the difference between JDK, JRE, and JVM?
2. How does the JVM handle garbage collection?
3. What is bytecode and how is it executed?
4. Can Java run without a JVM? Why or why not?
5. What happens during the compilation process?
Clarify Misunderstandings:
● Providing explanations for any areas where students are struggling.
5 mins CLOSING
Activity: Summarize Key Takeaways
● Ask participants to summarize what they learned today.
● Highlight the core concepts and next steps.
What’s Next:
● Introduction to Control Structures
● Homework: Practice compiling and running basic Java programs.