SlideShare a Scribd company logo
1 of 14
Java-(31.07.2023)
Dhinesh K
What is program?
 A set of instructions that you give to a computer so that it will do a
particular task.
 A computer program is a sequence or set of instructions in a
programming language for a computer to execute.
 A computer program in its human-readable form is called source
code.
Java is different from other Technologies &
Java Versions
 Its cross-platform capabilities
 Memory management system
 Pure oop approach
 Large and active community
 Popularity in enterprise applications all set it apart from other
languages.
Compiling & executing Java Program
 public class MyFirstJavaProgram {
public static void main(String []args) {
System.out.println("Hello World"); // prints Hello World
}
}
C:> javac MyFirstJavaProgram.java
C:> java MyFirstJavaProgram
 Case Sensitivity − Java is case sensitive
 Class Names − For all class names, the first letter should be in Upper Case
 Method Names − All method names should start with a Lower Case letter
 ex. public void myMethodName()
Keep in Mind! (Analysis)
 Program File Name − Name of the program file should exactly match the class
name.
 public static void main(String args[]) − Java program processing starts from
the main() method which is a mandatory part of every Java program
 public − scope of the class. Public means visible to all.
 class − declares the class in java.
 static − marks element as static so that it can be accessed without creating the
object.
 void − return type of the function. void refers to nothing.
 String[] args − command line arguments.
 System.out.println() − print the statement on the console.
 public static void main() − the main method is startup method of java program.
It is visible to all, it is static, so no object is required, and it is not returning any
Phases of Java Program
JVM, JRE, JDK
 1. JVM:
 It Stands For Java Virtual Machine. JVM Is A “Platform Dependent”.
 Also, It Executes The Bytecode Generated By The Java Compiler.
 Thus, It Provides The Run-Time Environment For The Applications To
Execute/Run.
 JVM Takes Care Of The Memory Area, Register Set, Also Provides A
Garbage Collection Heap.
 2. JRE:
 JRE Stands For Java Runtime Environment.
 It Also Gives An Environment To Run The Java Program.
 Thus, It Consists Of JVM And Java Class Libraries.
 JRE However Provides A Package Of Tools For Running Java Codes.
 3. JDK:
 JDK Stands For Java Development Kit.
 Though It Consists Of The Necessary Tools To Create Java Programs.
 Therefore, It Includes JRE, Compilers, Java Debugger, Javadoc.
 Also Require To Create, Compile, And Run The Java Source Code.
 In Simple Terms, It Is A Package Of Tools For Developing Java-Based
Software.
 It Requires A JRE Because Running Java Programs Is Part Of Developing
The Java Codes And Applications.
 4. ByteCode:
 Javac Compiles The Java Code And Generates Bytecode Which Is Saved
In A .Class File.
Features of java
 Why Java?
 Portable- WORA
 Security
 Designed for network programming
 Multi-thread(multiple simultaneous task)
 Dynamic & Extensible – Loaded only when needed, classes stored in
separate files
Primitive Data Types, Range
Type Casting in Java
 In Java, type casting is a method or process that converts a data
type into another data type in both ways manually and automatically.
 Convert a value from one data type to another data type is known
as type casting.
 1.Widening Type Casting
 Converting a lower data type into a higher one is called widening type
casting. It is also known as implicit conversion or casting down
 The target type must be larger than the source type.
 byte -> short -> char -> int -> long -> float -> double
 2.Narrowing Type Casting
 Converting a higher data type into a lower one is called narrowing type casting. It
is also known as explicit conversion or casting up.
 double -> float -> long -> int -> char -> short -> byte
Operators
Program/Interview questions

More Related Content

Similar to Java-1st.pptx about Java technology before oops (20)

Java ms harsha
Java ms harshaJava ms harsha
Java ms harsha
 
Java programming material for beginners by Nithin, VVCE, Mysuru
Java programming material for beginners by Nithin, VVCE, MysuruJava programming material for beginners by Nithin, VVCE, Mysuru
Java programming material for beginners by Nithin, VVCE, Mysuru
 
java basics.pptx
java basics.pptxjava basics.pptx
java basics.pptx
 
Sybsc cs sem 3 core java
Sybsc cs sem 3 core javaSybsc cs sem 3 core java
Sybsc cs sem 3 core java
 
UNIT 1.pptx
UNIT 1.pptxUNIT 1.pptx
UNIT 1.pptx
 
Java Programming
Java ProgrammingJava Programming
Java Programming
 
Unit-IV_Introduction to Java.pdf
Unit-IV_Introduction to Java.pdfUnit-IV_Introduction to Java.pdf
Unit-IV_Introduction to Java.pdf
 
Java introduction
Java introductionJava introduction
Java introduction
 
Introduction to Java Programming.pdf
Introduction to Java Programming.pdfIntroduction to Java Programming.pdf
Introduction to Java Programming.pdf
 
JAVA Program Examples
JAVA Program ExamplesJAVA Program Examples
JAVA Program Examples
 
JAVA for Every one
JAVA for Every oneJAVA for Every one
JAVA for Every one
 
CORE JAVA
CORE JAVACORE JAVA
CORE JAVA
 
Java programming basics
Java programming basicsJava programming basics
Java programming basics
 
Unit1 introduction to Java
Unit1 introduction to JavaUnit1 introduction to Java
Unit1 introduction to Java
 
Java unit 1
Java unit 1Java unit 1
Java unit 1
 
basic_java.ppt
basic_java.pptbasic_java.ppt
basic_java.ppt
 
Basic java part_ii
Basic java part_iiBasic java part_ii
Basic java part_ii
 
Inside JVM
Inside JVMInside JVM
Inside JVM
 
Core java
Core java Core java
Core java
 
Core java &collections
Core java &collectionsCore java &collections
Core java &collections
 

Recently uploaded

Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxhumanexperienceaaa
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 

Recently uploaded (20)

Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 

Java-1st.pptx about Java technology before oops

  • 2. What is program?  A set of instructions that you give to a computer so that it will do a particular task.  A computer program is a sequence or set of instructions in a programming language for a computer to execute.  A computer program in its human-readable form is called source code.
  • 3. Java is different from other Technologies & Java Versions  Its cross-platform capabilities  Memory management system  Pure oop approach  Large and active community  Popularity in enterprise applications all set it apart from other languages.
  • 4. Compiling & executing Java Program  public class MyFirstJavaProgram { public static void main(String []args) { System.out.println("Hello World"); // prints Hello World } } C:> javac MyFirstJavaProgram.java C:> java MyFirstJavaProgram  Case Sensitivity − Java is case sensitive  Class Names − For all class names, the first letter should be in Upper Case  Method Names − All method names should start with a Lower Case letter  ex. public void myMethodName()
  • 5. Keep in Mind! (Analysis)  Program File Name − Name of the program file should exactly match the class name.  public static void main(String args[]) − Java program processing starts from the main() method which is a mandatory part of every Java program  public − scope of the class. Public means visible to all.  class − declares the class in java.  static − marks element as static so that it can be accessed without creating the object.  void − return type of the function. void refers to nothing.  String[] args − command line arguments.  System.out.println() − print the statement on the console.  public static void main() − the main method is startup method of java program. It is visible to all, it is static, so no object is required, and it is not returning any
  • 6. Phases of Java Program
  • 7. JVM, JRE, JDK  1. JVM:  It Stands For Java Virtual Machine. JVM Is A “Platform Dependent”.  Also, It Executes The Bytecode Generated By The Java Compiler.  Thus, It Provides The Run-Time Environment For The Applications To Execute/Run.  JVM Takes Care Of The Memory Area, Register Set, Also Provides A Garbage Collection Heap.  2. JRE:  JRE Stands For Java Runtime Environment.  It Also Gives An Environment To Run The Java Program.  Thus, It Consists Of JVM And Java Class Libraries.  JRE However Provides A Package Of Tools For Running Java Codes.
  • 8.  3. JDK:  JDK Stands For Java Development Kit.  Though It Consists Of The Necessary Tools To Create Java Programs.  Therefore, It Includes JRE, Compilers, Java Debugger, Javadoc.  Also Require To Create, Compile, And Run The Java Source Code.  In Simple Terms, It Is A Package Of Tools For Developing Java-Based Software.  It Requires A JRE Because Running Java Programs Is Part Of Developing The Java Codes And Applications.  4. ByteCode:  Javac Compiles The Java Code And Generates Bytecode Which Is Saved In A .Class File.
  • 9. Features of java  Why Java?  Portable- WORA  Security  Designed for network programming  Multi-thread(multiple simultaneous task)  Dynamic & Extensible – Loaded only when needed, classes stored in separate files
  • 11.
  • 12. Type Casting in Java  In Java, type casting is a method or process that converts a data type into another data type in both ways manually and automatically.  Convert a value from one data type to another data type is known as type casting.  1.Widening Type Casting  Converting a lower data type into a higher one is called widening type casting. It is also known as implicit conversion or casting down  The target type must be larger than the source type.  byte -> short -> char -> int -> long -> float -> double  2.Narrowing Type Casting  Converting a higher data type into a lower one is called narrowing type casting. It is also known as explicit conversion or casting up.  double -> float -> long -> int -> char -> short -> byte