SlideShare a Scribd company logo
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
Java-1st.pptx about Java technology before oops
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
Ad

More Related Content

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

OOPS JAVA.pdf
OOPS JAVA.pdfOOPS JAVA.pdf
OOPS JAVA.pdf
DeepanshuMidha5140
 
Java ms harsha
Java ms harshaJava ms harsha
Java ms harsha
Harsha Batra
 
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
Nithin Kumar,VVCE, Mysuru
 
java basics.pptx
java basics.pptxjava basics.pptx
java basics.pptx
mlakshumaiah
 
Sybsc cs sem 3 core java
Sybsc cs sem 3 core javaSybsc cs sem 3 core java
Sybsc cs sem 3 core java
WE-IT TUTORIALS
 
UNIT 1.pptx
UNIT 1.pptxUNIT 1.pptx
UNIT 1.pptx
EduclentMegasoftel
 
Java Programming
Java ProgrammingJava Programming
Java Programming
Prof. Dr. K. Adisesha
 
Unit-IV_Introduction to Java.pdf
Unit-IV_Introduction to Java.pdfUnit-IV_Introduction to Java.pdf
Unit-IV_Introduction to Java.pdf
Assistant Professor, Shri Shivaji Science College, Amravati
 
Java introduction
Java introductionJava introduction
Java introduction
The icfai university jaipur
 
Introduction to Java Programming.pdf
Introduction to Java Programming.pdfIntroduction to Java Programming.pdf
Introduction to Java Programming.pdf
AdiseshaK
 
JAVA Program Examples
JAVA Program ExamplesJAVA Program Examples
JAVA Program Examples
Prof Chethan Raj C
 
JAVA for Every one
JAVA for Every oneJAVA for Every one
JAVA for Every one
Satyam Pandey
 
CORE JAVA
CORE JAVACORE JAVA
CORE JAVA
PUNE VIDYARTHI GRIHA'S COLLEGE OF ENGINEERING, NASHIK
 
Java programming basics
Java programming basicsJava programming basics
Java programming basics
Hamid Ghorbani
 
Unit1 introduction to Java
Unit1 introduction to JavaUnit1 introduction to Java
Unit1 introduction to Java
DevaKumari Vijay
 
Java unit 1
Java unit 1Java unit 1
Java unit 1
Shipra Swati
 
basic_java.ppt
basic_java.pptbasic_java.ppt
basic_java.ppt
sujatha629799
 
Basic java part_ii
Basic java part_iiBasic java part_ii
Basic java part_ii
Khaled AlGhazaly
 
Inside JVM
Inside JVMInside JVM
Inside JVM
Chinh Ngo Nguyen
 
Core java
Core java Core java
Core java
Ravi varma
 

Recently uploaded (20)

Mode-Wise Corridor Level Travel-Time Estimation Using Machine Learning Models
Mode-Wise Corridor Level Travel-Time Estimation Using Machine Learning ModelsMode-Wise Corridor Level Travel-Time Estimation Using Machine Learning Models
Mode-Wise Corridor Level Travel-Time Estimation Using Machine Learning Models
Journal of Soft Computing in Civil Engineering
 
Modelling of Concrete Compressive Strength Admixed with GGBFS Using Gene Expr...
Modelling of Concrete Compressive Strength Admixed with GGBFS Using Gene Expr...Modelling of Concrete Compressive Strength Admixed with GGBFS Using Gene Expr...
Modelling of Concrete Compressive Strength Admixed with GGBFS Using Gene Expr...
Journal of Soft Computing in Civil Engineering
 
Machine Learning basics POWERPOINT PRESENETATION
Machine Learning basics POWERPOINT PRESENETATIONMachine Learning basics POWERPOINT PRESENETATION
Machine Learning basics POWERPOINT PRESENETATION
DarrinBright1
 
Applications of Centroid in Structural Engineering
Applications of Centroid in Structural EngineeringApplications of Centroid in Structural Engineering
Applications of Centroid in Structural Engineering
suvrojyotihalder2006
 
Generative AI & Large Language Models Agents
Generative AI & Large Language Models AgentsGenerative AI & Large Language Models Agents
Generative AI & Large Language Models Agents
aasgharbee22seecs
 
Building-Services-Introduction-Notes.pdf
Building-Services-Introduction-Notes.pdfBuilding-Services-Introduction-Notes.pdf
Building-Services-Introduction-Notes.pdf
Lawrence Omai
 
Nanometer Metal-Organic-Framework Literature Comparison
Nanometer Metal-Organic-Framework  Literature ComparisonNanometer Metal-Organic-Framework  Literature Comparison
Nanometer Metal-Organic-Framework Literature Comparison
Chris Harding
 
最新版加拿大魁北克大学蒙特利尔分校毕业证(UQAM毕业证书)原版定制
最新版加拿大魁北克大学蒙特利尔分校毕业证(UQAM毕业证书)原版定制最新版加拿大魁北克大学蒙特利尔分校毕业证(UQAM毕业证书)原版定制
最新版加拿大魁北克大学蒙特利尔分校毕业证(UQAM毕业证书)原版定制
Taqyea
 
DED KOMINFO detail engginering design gedung
DED KOMINFO detail engginering design gedungDED KOMINFO detail engginering design gedung
DED KOMINFO detail engginering design gedung
nabilarizqifadhilah1
 
Control Methods of Noise Pollutions.pptx
Control Methods of Noise Pollutions.pptxControl Methods of Noise Pollutions.pptx
Control Methods of Noise Pollutions.pptx
vvsasane
 
A Survey of Personalized Large Language Models.pptx
A Survey of Personalized Large Language Models.pptxA Survey of Personalized Large Language Models.pptx
A Survey of Personalized Large Language Models.pptx
rutujabhaskarraopati
 
Dynamics of Structures with Uncertain Properties.pptx
Dynamics of Structures with Uncertain Properties.pptxDynamics of Structures with Uncertain Properties.pptx
Dynamics of Structures with Uncertain Properties.pptx
University of Glasgow
 
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjjseninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
AjijahamadKhaji
 
Artificial intelligence and machine learning.pptx
Artificial intelligence and machine learning.pptxArtificial intelligence and machine learning.pptx
Artificial intelligence and machine learning.pptx
rakshanatarajan005
 
Analog electronic circuits with some imp
Analog electronic circuits with some impAnalog electronic circuits with some imp
Analog electronic circuits with some imp
KarthikTG7
 
Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025
Antonin Danalet
 
Machine foundation notes for civil engineering students
Machine foundation notes for civil engineering studentsMachine foundation notes for civil engineering students
Machine foundation notes for civil engineering students
DYPCET
 
hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .
NABLAS株式会社
 
ATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ATAL 6 Days Online FDP Scheme Document 2025-26.pdfATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ssuserda39791
 
PRIZ Academy - Functional Modeling In Action with PRIZ.pdf
PRIZ Academy - Functional Modeling In Action with PRIZ.pdfPRIZ Academy - Functional Modeling In Action with PRIZ.pdf
PRIZ Academy - Functional Modeling In Action with PRIZ.pdf
PRIZ Guru
 
Machine Learning basics POWERPOINT PRESENETATION
Machine Learning basics POWERPOINT PRESENETATIONMachine Learning basics POWERPOINT PRESENETATION
Machine Learning basics POWERPOINT PRESENETATION
DarrinBright1
 
Applications of Centroid in Structural Engineering
Applications of Centroid in Structural EngineeringApplications of Centroid in Structural Engineering
Applications of Centroid in Structural Engineering
suvrojyotihalder2006
 
Generative AI & Large Language Models Agents
Generative AI & Large Language Models AgentsGenerative AI & Large Language Models Agents
Generative AI & Large Language Models Agents
aasgharbee22seecs
 
Building-Services-Introduction-Notes.pdf
Building-Services-Introduction-Notes.pdfBuilding-Services-Introduction-Notes.pdf
Building-Services-Introduction-Notes.pdf
Lawrence Omai
 
Nanometer Metal-Organic-Framework Literature Comparison
Nanometer Metal-Organic-Framework  Literature ComparisonNanometer Metal-Organic-Framework  Literature Comparison
Nanometer Metal-Organic-Framework Literature Comparison
Chris Harding
 
最新版加拿大魁北克大学蒙特利尔分校毕业证(UQAM毕业证书)原版定制
最新版加拿大魁北克大学蒙特利尔分校毕业证(UQAM毕业证书)原版定制最新版加拿大魁北克大学蒙特利尔分校毕业证(UQAM毕业证书)原版定制
最新版加拿大魁北克大学蒙特利尔分校毕业证(UQAM毕业证书)原版定制
Taqyea
 
DED KOMINFO detail engginering design gedung
DED KOMINFO detail engginering design gedungDED KOMINFO detail engginering design gedung
DED KOMINFO detail engginering design gedung
nabilarizqifadhilah1
 
Control Methods of Noise Pollutions.pptx
Control Methods of Noise Pollutions.pptxControl Methods of Noise Pollutions.pptx
Control Methods of Noise Pollutions.pptx
vvsasane
 
A Survey of Personalized Large Language Models.pptx
A Survey of Personalized Large Language Models.pptxA Survey of Personalized Large Language Models.pptx
A Survey of Personalized Large Language Models.pptx
rutujabhaskarraopati
 
Dynamics of Structures with Uncertain Properties.pptx
Dynamics of Structures with Uncertain Properties.pptxDynamics of Structures with Uncertain Properties.pptx
Dynamics of Structures with Uncertain Properties.pptx
University of Glasgow
 
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjjseninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
AjijahamadKhaji
 
Artificial intelligence and machine learning.pptx
Artificial intelligence and machine learning.pptxArtificial intelligence and machine learning.pptx
Artificial intelligence and machine learning.pptx
rakshanatarajan005
 
Analog electronic circuits with some imp
Analog electronic circuits with some impAnalog electronic circuits with some imp
Analog electronic circuits with some imp
KarthikTG7
 
Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025
Antonin Danalet
 
Machine foundation notes for civil engineering students
Machine foundation notes for civil engineering studentsMachine foundation notes for civil engineering students
Machine foundation notes for civil engineering students
DYPCET
 
hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .
NABLAS株式会社
 
ATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ATAL 6 Days Online FDP Scheme Document 2025-26.pdfATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ssuserda39791
 
PRIZ Academy - Functional Modeling In Action with PRIZ.pdf
PRIZ Academy - Functional Modeling In Action with PRIZ.pdfPRIZ Academy - Functional Modeling In Action with PRIZ.pdf
PRIZ Academy - Functional Modeling In Action with PRIZ.pdf
PRIZ Guru
 
Ad

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
  • 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
  翻译: