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)

five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdffive-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
AdityaSharma944496
 
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptxLidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
RishavKumar530754
 
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Journal of Soft Computing in Civil Engineering
 
Smart_Storage_Systems_Production_Engineering.pptx
Smart_Storage_Systems_Production_Engineering.pptxSmart_Storage_Systems_Production_Engineering.pptx
Smart_Storage_Systems_Production_Engineering.pptx
rushikeshnavghare94
 
Structural Response of Reinforced Self-Compacting Concrete Deep Beam Using Fi...
Structural Response of Reinforced Self-Compacting Concrete Deep Beam Using Fi...Structural Response of Reinforced Self-Compacting Concrete Deep Beam Using Fi...
Structural Response of Reinforced Self-Compacting Concrete Deep Beam Using Fi...
Journal of Soft Computing in Civil Engineering
 
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E..."Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
Infopitaara
 
Machine learning project on employee attrition detection using (2).pptx
Machine learning project on employee attrition detection using (2).pptxMachine learning project on employee attrition detection using (2).pptx
Machine learning project on employee attrition detection using (2).pptx
rajeswari89780
 
Oil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdfOil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdf
M7md3li2
 
Metal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistryMetal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistry
mee23nu
 
Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.
anuragmk56
 
Smart Storage Solutions.pptx for production engineering
Smart Storage Solutions.pptx for production engineeringSmart Storage Solutions.pptx for production engineering
Smart Storage Solutions.pptx for production engineering
rushikeshnavghare94
 
Introduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptxIntroduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptx
AS1920
 
Level 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical SafetyLevel 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical Safety
JoseAlbertoCariasDel
 
IntroSlides-April-BuildWithAI-VertexAI.pdf
IntroSlides-April-BuildWithAI-VertexAI.pdfIntroSlides-April-BuildWithAI-VertexAI.pdf
IntroSlides-April-BuildWithAI-VertexAI.pdf
Luiz Carneiro
 
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
charlesdick1345
 
introduction to machine learining for beginers
introduction to machine learining for beginersintroduction to machine learining for beginers
introduction to machine learining for beginers
JoydebSheet
 
Reagent dosing (Bredel) presentation.pptx
Reagent dosing (Bredel) presentation.pptxReagent dosing (Bredel) presentation.pptx
Reagent dosing (Bredel) presentation.pptx
AlejandroOdio
 
new ppt artificial intelligence historyyy
new ppt artificial intelligence historyyynew ppt artificial intelligence historyyy
new ppt artificial intelligence historyyy
PianoPianist
 
The Gaussian Process Modeling Module in UQLab
The Gaussian Process Modeling Module in UQLabThe Gaussian Process Modeling Module in UQLab
The Gaussian Process Modeling Module in UQLab
Journal of Soft Computing in Civil Engineering
 
Artificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptxArtificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptx
aditichinar
 
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdffive-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
AdityaSharma944496
 
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptxLidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
RishavKumar530754
 
Smart_Storage_Systems_Production_Engineering.pptx
Smart_Storage_Systems_Production_Engineering.pptxSmart_Storage_Systems_Production_Engineering.pptx
Smart_Storage_Systems_Production_Engineering.pptx
rushikeshnavghare94
 
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E..."Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
Infopitaara
 
Machine learning project on employee attrition detection using (2).pptx
Machine learning project on employee attrition detection using (2).pptxMachine learning project on employee attrition detection using (2).pptx
Machine learning project on employee attrition detection using (2).pptx
rajeswari89780
 
Oil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdfOil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdf
M7md3li2
 
Metal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistryMetal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistry
mee23nu
 
Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.
anuragmk56
 
Smart Storage Solutions.pptx for production engineering
Smart Storage Solutions.pptx for production engineeringSmart Storage Solutions.pptx for production engineering
Smart Storage Solutions.pptx for production engineering
rushikeshnavghare94
 
Introduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptxIntroduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptx
AS1920
 
Level 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical SafetyLevel 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical Safety
JoseAlbertoCariasDel
 
IntroSlides-April-BuildWithAI-VertexAI.pdf
IntroSlides-April-BuildWithAI-VertexAI.pdfIntroSlides-April-BuildWithAI-VertexAI.pdf
IntroSlides-April-BuildWithAI-VertexAI.pdf
Luiz Carneiro
 
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
charlesdick1345
 
introduction to machine learining for beginers
introduction to machine learining for beginersintroduction to machine learining for beginers
introduction to machine learining for beginers
JoydebSheet
 
Reagent dosing (Bredel) presentation.pptx
Reagent dosing (Bredel) presentation.pptxReagent dosing (Bredel) presentation.pptx
Reagent dosing (Bredel) presentation.pptx
AlejandroOdio
 
new ppt artificial intelligence historyyy
new ppt artificial intelligence historyyynew ppt artificial intelligence historyyy
new ppt artificial intelligence historyyy
PianoPianist
 
Artificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptxArtificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptx
aditichinar
 
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