Upgrade to Pro — share decks privately, control downloads, hide ads and more …

ppt1

 ppt1

java feature

Avatar for aarju mujawar

aarju mujawar

September 03, 2026

Other Decks in Education

Transcript

  1. Java Programming — PPT Points : • JAVA PROGRAMMING Features,

    • Environment, • Data Types, Presented by : Ms. A.R.Mujawar
  2. Introduction to Java  Java is a high-level, object-oriented programming

    language.  Developed by Sun Microsystems in 1995.  Java follows the principle: “Write Once, Run Anywhere.”  Java programs run on the Java Virtual Machine (JVM).  Java is widely used for:  Web applications  Desktop applications  Mobile applications  Enterprise software  Cloud applications
  3. Features of Java  Simple – Easy syntax and programming

    concepts.  Object-Oriented – Based on classes and objects.  Platform Independent – Java bytecode can run on different platforms.  Secure – Provides runtime security features.  Robust – Strong memory management and exception handling.  Portable – Java programs can be moved between platforms.  Multithreaded – Supports execution of multiple tasks simultaneously.  High Performance – Uses Just-In-Time (JIT) compilation.  Distributed – Supports network-based applications.  Dynamic – Classes can be loaded when required.
  4. Java Programming Environment The Java programming environment mainly consists of:

    •JDK (Java Development Kit) •Used to develop Java programs. •Contains compiler and development tools. •JRE (Java Runtime Environment) •Provides the environment required to run Java programs. •JVM (Java Virtual Machine) •Executes Java bytecode. Flow: Java Source Code (.java) → Compiler (javac) → Bytecode (.class) → JVM → Outpu
  5. A class is a blueprint or template used to create

    objects. A class contains: Define a Class •Variables/data members •Methods/member functions •Constructors class Student { int rollNo; String name; void display() { System.out.println(rollNo + " " + name); } }
  6. Creating an Object  An object is an instance of

    a class. Syntax: ClassName objectName = new ClassName(); Example: Student s1 = new Student(); s1.rollNo = 101; s1.name = "Rahul"; s1.display(); Here: •Student → Class •s1 → Object •new → Creates an object in memory
  7. Accessing Members  Members of class can be accessed using

    (. )dot operator.  class Student {  int age;  void show() { System.out.println(age);  }   }  class Demo { public static void main(String[] args) {   Student s = new Student();  s.age = 20;  s.show(); }   }
  8. Java Tokens  Tokens are the smallest individual elements of

    a Java program.  Types of tokens:  Keywords  Identifiers  Literals  Operators  Separators  Example int age = 20; •int → Keyword •age → Identifier •20 → Literal •= → Operator •; → Separator
  9. Java Data Types Java data types are divided into two

    categories: 1. Primitive Data Types •byte •short •int •long •float •double •char •boolean 2. Non-Primitive Data Types •String •Arrays •Classes •Objects •Interfaces
  10. Constants A constant is a value that cannot be changed

    after it is initialized. The final keyword is used to declare constants. final int MAX = 100; final double PI = 3.14159; Trying to change a final variable causes a compilation error. MAX = 200; // Error
  11. variable  A variable is a named memory location used

    to store data.  Types of variables:  Local variable  Instance variable  Static variable  Example:  int age = 20;  String name = "Amit";
  12. Dynamic Initialization  Dynamic Initialization  Dynamic initialization means assigning

    a value to a variable using an expression or calculation during program execution.  int a = 10;  int b = 20;  int sum = a + b;  System.out.println(sum);
  13. Arrays  An array is a collection of elements of

    the same data type.  Declaration:  int[] marks; Creation: marks = new int[5]; Initialization int[] marks = {80, 75, 90, 85, 95}; Accesing element System.out.println(marks[0]); 
  14. summary  In this presentation, we learned:  Features of

    Java  Java programming environment  Classes and objects  Accessing class members  Java tokens  Data types and constants  Variables and dynamic initialization  Arrays