0% found this document useful (0 votes)
18 views9 pages

Java Day1 Introduction Detailed

This document provides an introduction to Java, highlighting its features as a high-level, object-oriented programming language developed by Sun Microsystems. It covers Java architecture, including JDK, JRE, and JVM, as well as basic syntax, data types, and the process of writing and running a Java program. The document concludes with a recap of the topics covered and outlines next steps for learning more about Java.

Uploaded by

bdsingh9040
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views9 pages

Java Day1 Introduction Detailed

This document provides an introduction to Java, highlighting its features as a high-level, object-oriented programming language developed by Sun Microsystems. It covers Java architecture, including JDK, JRE, and JVM, as well as basic syntax, data types, and the process of writing and running a Java program. The document concludes with a recap of the topics covered and outlines next steps for learning more about Java.

Uploaded by

bdsingh9040
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Introduction to Java - Day 1

A detailed guide with deep concepts


& examples
What is Java?
• - Java is a high-level, object-oriented
programming language.
• - Developed by Sun Microsystems in 1995,
now owned by Oracle.
• - It follows the WORA (Write Once, Run
Anywhere) principle.
• - Java applications are compiled into bytecode
and run on the JVM.
Features of Java
• - Platform Independent (Runs on JVM)
• - Object-Oriented
• - Secure and Robust
• - Multi-threaded
• - High Performance (JIT Compiler)
• - Rich API & Community Support
Java Architecture (JDK, JRE, JVM)
• - **JDK (Java Development Kit)**: Includes
tools to develop & compile Java applications.
• - **JRE (Java Runtime Environment)**:
Provides the runtime environment for Java
applications.
• - **JVM (Java Virtual Machine)**: Converts
bytecode into machine code for execution.
Writing & Running a Java Program
• 1. Write a simple Java program (`HelloWorld.java`).
• 2. Compile using `javac HelloWorld.java`.
• 3. Run using `java HelloWorld`.

• Example:

• ```java
• public class HelloWorld {
• public static void main(String[] args) {
• System.out.println("Hello, World!");
• }
• }
• ```
Java Syntax and Structure
• - Java programs are structured in **classes**
and contain a `main()` method.
• - Every statement ends with a **semicolon
(;)**.
• - Curly braces `{}` define blocks of code.
• - Java is case-sensitive.
Variables and Data Types
• - **Primitive Data Types**: int, float, char, boolean, double,
etc.
• - **Reference Data Types**: Strings, Arrays, Objects.
• - Example:

• ```java
• int age = 20;
• double price = 99.99;
• boolean isJavaFun = true;
• ```
Installing Java and Setting Up
Environment
• - Download JDK from Oracle or OpenJDK.
• - Install an IDE (Eclipse, IntelliJ, VS Code).
• - Set up the `JAVA_HOME` environment
variable.
• - Verify installation using `java -version` and
`javac -version`.
Recap & Next Steps
• - Java is an object-oriented, platform-
independent language.
• - Java programs are compiled into bytecode
and run on JVM.
• - Learned Java syntax, variables, and program
structure.
• - Next: Data Types, Operators, and Control
Statements.

You might also like