SlideShare a Scribd company logo
1 of 35
1
JAVA PROGRAMMING
By
Dr.T.Abirami
Associate Professor
Department of IT
Kongu Engineering College Perundurai
2/3/2021
2
Introduction
2/3/2021
Author ,Year and Company
 Started in 1995 by SUN Microsystems
 James gosling, Arthur Van hoff, Andy
bechtolsheim
3
James Gosling
Oak is a symbol of strength
2/3/2021
Java Indroduction
 It is programming language
 It is class based and object oriented
programming language
 It is a platform independent language
 Java is both compiler and interpreter
language
 Java follows a bottom-up approach
4
2/3/2021
Real-World Java Applications
 Desktop GUI Applications
 Android Apps
 Web Applications
 Software Tools
 Trading Application
 J2ME Apps
 Embedded Space
 Big Data technologies
 Scientific Applications
5
2/3/2021
Example
 Banking: To deal with transaction management.
 Retail: Billing applications that you see in a
store/restaurant are completely written in Java.
 Information Technology: Java is designed to solve
implementation dependencies.
 Android: Applications are either written in Java or use Java
API.
 Financial services: It is used in server-side applications.
 Stock market: To write algorithms as to which company
they should invest in.
 Big Data: Hadoop MapReduce framework is written using
Java.
 Scientific and Research Community: To deal with huge
amount of data.
6
2/3/2021
Application
 Desktop Applications such as acrobat reader,
media player, antivirus, etc.
 Web Applications
 Enterprise Applications such as banking
applications.
 Mobile
 Embedded System
 Smart Card
 Robotics
 Games, etc.
7
2/3/2021
Where it is used?
 1. Google's (Gmail & Youtube) is built
on Java/some other lang.
2. Twitter (Netty) & Linkedin uses Java
& Scala.
3. Amazon, Ebay, Blogger uses almost
Java.
8
2/3/2021
Types of Java Applications
 1) Standalone Application
 2) Web Application
 3) Enterprise Application
 4) Mobile Application
9
2/3/2021
Java Editions
 1) Java SE (Java Standard Edition) - It is a
Java programming platform.
 2) Java EE (Java Enterprise Edition) - It is an
enterprise platform which is mainly used to develop web and
enterprise applications.
 3) Java ME (Java Micro Edition) - to develop
mobile applications.
 4) JavaFX-to develop rich internet applications.
10
2/3/2021
Popular companies
 Uber
 Airbnb
 Google
 Pinterest
 Netflix
 Spotify
 Amazon
 Slack
 Instagram, etc.
11
2/3/2021
Java Version History
 JDK Alpha and Beta (1995)
 JDK 1.0 (23rd Jan 1996)
 JDK 1.1 (19th Feb 1997)
 J2SE 1.2 (8th Dec 1998)
 J2SE 1.3 (8th May 2000)
 J2SE 1.4 (6th Feb 2002)
 J2SE 5.0 (30th Sep 2004)
 Java SE 6 (11th Dec 2006)
 Java SE 7 (28th July 2011)
 Java SE 8 (18th Mar 2014)
 Java SE 9 (21st Sep 2017)
 Java SE 10 (20th Mar 2018)
 Java SE 11 and 14 ,15
12
2/3/2021
A Step By Step Guide To How To
Setup Eclipse IDE On Windows?
 Install Java
 Setup Eclipse IDE on Windows
 Hello World Program
13
2/3/2021
How to Download and Install
Eclipse to Run Java
 Step 1: Go to the Java Downloads Page and click
on the option of Download.
https://www.oracle.com/in/java/technologies/jav
ase-downloads.html
 2. Setup path
14
2/3/2021
Set the path for Java(JDK)
 Step 2: Once the installation is over
follow the below instructions to set the
path of the file.
 Go to start and search for ‘System’. Then,
click on ‘System’ and go to Advanced
System Settings. Refer below.
15
2/3/2021
Now, click on ‘Environment Variables’
under ‘Advanced’ tab as shown below:
16
2/3/2021
Install Eclipse:
https://www.eclipse.org/downloads/packag
es/release/Neon/2
17
2/3/2021
JDK, JRE, and JVM
JVM
 JVM (Java Virtual Machine) is an abstract
machine.
 It is called a virtual machine because it doesn't
physically exist.
 It is a specification that provides a runtime
environment in which Java bytecode can be
executed.
 It can also run those programs which are written
in other languages and compiled to Java
bytecode.
18
2/3/2021
The JVM performs the following
main tasks:
 Loads code
 Verifies code
 Executes code
 Provides runtime environment
19
Execution Engine :It contains:
• A virtual processor
• Interpreter: Read bytecode stream then execute the instructions.
• Just-In-Time(JIT) compiler:
•It is used to improve the performance.
•JIT compiles parts of the byte code that have similar functionality at the same time,
and hence reduces the amount of time needed for compilation.
• Here, the term "compiler" refers to a translator from the instruction set of a Java
virtual machine (JVM) to the instruction set of a specific CPU.
2/3/2021
JRE
 JRE is an acronym for Java Runtime Environment.
 It is also written as Java RTE.
 It is a set of software tools which are used for
developing Java applications.
 It is used to provide the runtime environment.
 It is the implementation of JVM.
 It physically exists.
 It contains a set of libraries + other files that JVM
uses at runtime.
20
2/3/2021
JDK(Java Development Kit)
 It is a software development environment which is used to
develop Java applications and applets.
 It physically exists.
 It contains JRE + development tools.
 The JDK contains a private Java Virtual Machine (JVM) and a few
other resources such as an interpreter/loader (java), a compiler
(javac), an archiver (jar), a documentation generator (Javadoc),
etc. to complete the development of a Java Application.
21
2/3/2021
Learning Objectives
 To learn why Java is useful for the design of desktop , web and mobile
applications.
 To learn how to implement object-oriented designs with Java.
 To identify Java language components and how they work together in
applications.
 To design and program stand-alone Java applications.
 To learn how to design a graphical user interface (GUI) with Java AWT.
 To learn how to extend Java classes with inheritance and dynamic binding.
 To learn how to use exception handling in Java applications.
 To learn Java generics and how to use the Java Collections API.
 To understand how to design applications with threads in Java.
 To learn how to read and write files in Java.
22
2/3/2021
18ITO03 - JAVA
PROGRAMMING
23
2/3/2021
24
2/3/2021
LABORATORY
25
2/3/2021
26
First Program
public class HelloWorld {
public static void main(String args[])
{
System.out.println("Hello World");
}
}
2/3/2021
27
Compiling and Running
HelloWorld.java
javac HelloWorld.java
java HelloWorld HelloWorld.class
compile
run
bytecode
source code
2/3/2021
Why is JAVA a platform independent
language?
28
platform is the computer and the operating system running on it. The operating system can be
Windows, Mac, Linux, or any of many others It provides the environment to run the program
2/3/2021
Compiled Programs With Different
Operating Systems
Windows
compiler
Executable (Windows)
UNIX
compiler
Executable (UNIX)
Mac OS
compiler
Executable (Mac)
Computer
program
29
2/3/2021
A High Level View Of
Translating/Executing Java Programs
Java compiler
(javac)
Java program
Filename.java
Java
bytecode
(generic
binary)
Filename.class
Stage 1:
Compilation
30
2/3/2021
A High Level View Of
Translating/Executing Java Programs (2)
Java
interpreter
(java)
Java
bytecode
(generic
binary)
Filename.class
Machine language
instruction (UNIX)
Machine language
instruction
(Windows)
Machine language
instruction (Apple)
Stage 2: Interpreting and executing the
byte code
31
2/3/2021
Creating, Compiling And Running Java
Programs On The Computer Science
Network
javac
Java compiler
Java byte
code
filename.class
(UNIX file)
To compile the program
at the command line type
"javac filename.java"
To run the interpreter,
at the command line
type "java filename"
java
Java
Interpreter
Type it in with the text editor of
your choice
filename.java
(Unix file)
Java
program
32
2/3/2021
Compiling The Smallest Java Program
public class Smallest
{
public static void main (String[] args)
{
}
}
Smallest.java
javac
(Java byte code)
10000100000001000
00100100000001001
: :
Smallest.class
Type “javac
Smallest.java”
33
2/3/2021
Running The Smallest Java Program
(Java byte code)
10000100000001000
00100100000001001
: :
Smallest.class
java
Type “java
Smallest”
(Platform/Operating specific binary
10100111000001000
00100111001111001
: :
34
2/3/2021
35
Notice:
 Java is CASE SENSITIVE!!
 File name has to be the same as class
name in file.
 Need to import necessary class definitions
2/3/2021

More Related Content

What's hot

What's hot (17)

Android summer training report
Android summer training reportAndroid summer training report
Android summer training report
 
Java Programming (M&M)
Java Programming (M&M)Java Programming (M&M)
Java Programming (M&M)
 
Features of java unit 1
Features of java unit 1Features of java unit 1
Features of java unit 1
 
Summer training report on java se6 technology
Summer training  report on java se6 technologySummer training  report on java se6 technology
Summer training report on java se6 technology
 
Core java kvr - satya
Core  java kvr - satyaCore  java kvr - satya
Core java kvr - satya
 
Java application-development
Java application-developmentJava application-development
Java application-development
 
Core Java Training report
Core Java Training reportCore Java Training report
Core Java Training report
 
Advance java summer training report
Advance java summer training report Advance java summer training report
Advance java summer training report
 
Professional-core-java-training
Professional-core-java-trainingProfessional-core-java-training
Professional-core-java-training
 
Industrial Training report on java
Industrial  Training report on javaIndustrial  Training report on java
Industrial Training report on java
 
130700548484460000
130700548484460000130700548484460000
130700548484460000
 
Core java report
Core java reportCore java report
Core java report
 
Report summer training core java
Report summer training core javaReport summer training core java
Report summer training core java
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
J introtojava1-pdf
J introtojava1-pdfJ introtojava1-pdf
J introtojava1-pdf
 
Ijetcas14 385
Ijetcas14 385Ijetcas14 385
Ijetcas14 385
 
Object oriented programming-with_java
Object oriented programming-with_javaObject oriented programming-with_java
Object oriented programming-with_java
 

Similar to Java Programming : introduction

Java Semimar Slide (Cetpa)
Java Semimar Slide (Cetpa)Java Semimar Slide (Cetpa)
Java Semimar Slide (Cetpa)Pratima Parida
 
Project report for final year project
Project report for final year projectProject report for final year project
Project report for final year projectsuneel singh
 
J2ee strutswithhibernate-140121221332-phpapp01
J2ee strutswithhibernate-140121221332-phpapp01J2ee strutswithhibernate-140121221332-phpapp01
J2ee strutswithhibernate-140121221332-phpapp01Jay Palit
 
Java & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate FrameworkJava & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate FrameworkMohit Belwal
 
C,c++,java,php,.net training institute in delhi, best training institute for ...
C,c++,java,php,.net training institute in delhi, best training institute for ...C,c++,java,php,.net training institute in delhi, best training institute for ...
C,c++,java,php,.net training institute in delhi, best training institute for ...MCM COmpetitive Classes
 
Core Java Slides
Core Java SlidesCore Java Slides
Core Java SlidesVinit Vyas
 
JAVA PROGRAMMING-Unit I - Final PPT.pptx
JAVA PROGRAMMING-Unit I - Final PPT.pptxJAVA PROGRAMMING-Unit I - Final PPT.pptx
JAVA PROGRAMMING-Unit I - Final PPT.pptxSuganthiDPSGRKCW
 
Java Is A Programming Dialect And Registering Stage Essay
Java Is A Programming Dialect And Registering Stage EssayJava Is A Programming Dialect And Registering Stage Essay
Java Is A Programming Dialect And Registering Stage EssayLiz Sims
 
Best java courses in navi mumbai best classes for java in navi mumbai-java cl...
Best java courses in navi mumbai best classes for java in navi mumbai-java cl...Best java courses in navi mumbai best classes for java in navi mumbai-java cl...
Best java courses in navi mumbai best classes for java in navi mumbai-java cl...anshkhurana01
 
Introduction to java
Introduction to  javaIntroduction to  java
Introduction to javaKalai Selvi
 
FRAUD DETECTION IN ONLINE AUCTIONING
FRAUD DETECTION IN ONLINE AUCTIONINGFRAUD DETECTION IN ONLINE AUCTIONING
FRAUD DETECTION IN ONLINE AUCTIONINGSatish Chandra
 
Chapter 1 introduction to java technology
Chapter 1 introduction to java technologyChapter 1 introduction to java technology
Chapter 1 introduction to java technologysshhzap
 
Java Programming 100 Programming Challenges
Java Programming 100 Programming ChallengesJava Programming 100 Programming Challenges
Java Programming 100 Programming ChallengesJavier Crisostomo
 
JAVA ALL 5 MODULE NOTES.pptx
JAVA ALL 5 MODULE NOTES.pptxJAVA ALL 5 MODULE NOTES.pptx
JAVA ALL 5 MODULE NOTES.pptxDrPreethiD1
 
Object oriented programming-with_java
Object oriented programming-with_javaObject oriented programming-with_java
Object oriented programming-with_javaHarry Potter
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programmingJames Wong
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programmingFraboni Ec
 

Similar to Java Programming : introduction (20)

Java Semimar Slide (Cetpa)
Java Semimar Slide (Cetpa)Java Semimar Slide (Cetpa)
Java Semimar Slide (Cetpa)
 
Project report for final year project
Project report for final year projectProject report for final year project
Project report for final year project
 
J2ee strutswithhibernate-140121221332-phpapp01
J2ee strutswithhibernate-140121221332-phpapp01J2ee strutswithhibernate-140121221332-phpapp01
J2ee strutswithhibernate-140121221332-phpapp01
 
Java & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate FrameworkJava & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate Framework
 
C,c++,java,php,.net training institute in delhi, best training institute for ...
C,c++,java,php,.net training institute in delhi, best training institute for ...C,c++,java,php,.net training institute in delhi, best training institute for ...
C,c++,java,php,.net training institute in delhi, best training institute for ...
 
Ah java-ppt1
Ah java-ppt1Ah java-ppt1
Ah java-ppt1
 
Core Java Slides
Core Java SlidesCore Java Slides
Core Java Slides
 
JAVA PROGRAMMING-Unit I - Final PPT.pptx
JAVA PROGRAMMING-Unit I - Final PPT.pptxJAVA PROGRAMMING-Unit I - Final PPT.pptx
JAVA PROGRAMMING-Unit I - Final PPT.pptx
 
Java Is A Programming Dialect And Registering Stage Essay
Java Is A Programming Dialect And Registering Stage EssayJava Is A Programming Dialect And Registering Stage Essay
Java Is A Programming Dialect And Registering Stage Essay
 
Best java courses in navi mumbai best classes for java in navi mumbai-java cl...
Best java courses in navi mumbai best classes for java in navi mumbai-java cl...Best java courses in navi mumbai best classes for java in navi mumbai-java cl...
Best java courses in navi mumbai best classes for java in navi mumbai-java cl...
 
Introduction to java
Introduction to  javaIntroduction to  java
Introduction to java
 
Java presentation
Java presentationJava presentation
Java presentation
 
Java course in Chandigarh.pdf
Java course in Chandigarh.pdfJava course in Chandigarh.pdf
Java course in Chandigarh.pdf
 
FRAUD DETECTION IN ONLINE AUCTIONING
FRAUD DETECTION IN ONLINE AUCTIONINGFRAUD DETECTION IN ONLINE AUCTIONING
FRAUD DETECTION IN ONLINE AUCTIONING
 
Chapter 1 introduction to java technology
Chapter 1 introduction to java technologyChapter 1 introduction to java technology
Chapter 1 introduction to java technology
 
Java Programming 100 Programming Challenges
Java Programming 100 Programming ChallengesJava Programming 100 Programming Challenges
Java Programming 100 Programming Challenges
 
JAVA ALL 5 MODULE NOTES.pptx
JAVA ALL 5 MODULE NOTES.pptxJAVA ALL 5 MODULE NOTES.pptx
JAVA ALL 5 MODULE NOTES.pptx
 
Object oriented programming-with_java
Object oriented programming-with_javaObject oriented programming-with_java
Object oriented programming-with_java
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 

More from Kongu Engineering College, Perundurai, Erode

More from Kongu Engineering College, Perundurai, Erode (20)

Introduction to Spring & Spring BootFramework
Introduction to Spring  & Spring BootFrameworkIntroduction to Spring  & Spring BootFramework
Introduction to Spring & Spring BootFramework
 
A REST API (also called a RESTful API or RESTful web API) is an application p...
A REST API (also called a RESTful API or RESTful web API) is an application p...A REST API (also called a RESTful API or RESTful web API) is an application p...
A REST API (also called a RESTful API or RESTful web API) is an application p...
 
SOA and Monolith Architecture - Micro Services.pptx
SOA and Monolith Architecture - Micro Services.pptxSOA and Monolith Architecture - Micro Services.pptx
SOA and Monolith Architecture - Micro Services.pptx
 
Application Layer.pptx
Application Layer.pptxApplication Layer.pptx
Application Layer.pptx
 
Connect to NoSQL Database using Node JS.pptx
Connect to NoSQL Database using Node JS.pptxConnect to NoSQL Database using Node JS.pptx
Connect to NoSQL Database using Node JS.pptx
 
Node_basics.pptx
Node_basics.pptxNode_basics.pptx
Node_basics.pptx
 
Navigation Bar.pptx
Navigation Bar.pptxNavigation Bar.pptx
Navigation Bar.pptx
 
Bootstarp installation.pptx
Bootstarp installation.pptxBootstarp installation.pptx
Bootstarp installation.pptx
 
nested_Object as Parameter & Recursion_Later_commamd.pptx
nested_Object as Parameter  & Recursion_Later_commamd.pptxnested_Object as Parameter  & Recursion_Later_commamd.pptx
nested_Object as Parameter & Recursion_Later_commamd.pptx
 
Chapter 3.pdf
Chapter 3.pdfChapter 3.pdf
Chapter 3.pdf
 
Introduction to Social Media and Social Networks.pdf
Introduction to Social Media and Social Networks.pdfIntroduction to Social Media and Social Networks.pdf
Introduction to Social Media and Social Networks.pdf
 
Dropdown Menu or Combo List.pdf
Dropdown Menu or Combo List.pdfDropdown Menu or Combo List.pdf
Dropdown Menu or Combo List.pdf
 
div tag.pdf
div tag.pdfdiv tag.pdf
div tag.pdf
 
Dimensions of elements.pdf
Dimensions of elements.pdfDimensions of elements.pdf
Dimensions of elements.pdf
 
CSS Positioning Elements.pdf
CSS Positioning Elements.pdfCSS Positioning Elements.pdf
CSS Positioning Elements.pdf
 
Random number generation_upload.pdf
Random number generation_upload.pdfRandom number generation_upload.pdf
Random number generation_upload.pdf
 
JavaScript_introduction_upload.pdf
JavaScript_introduction_upload.pdfJavaScript_introduction_upload.pdf
JavaScript_introduction_upload.pdf
 
Computer Networks: Quality of service
Computer Networks: Quality of serviceComputer Networks: Quality of service
Computer Networks: Quality of service
 
Transport layer protocols : Simple Protocol , Stop and Wait Protocol , Go-Bac...
Transport layer protocols : Simple Protocol , Stop and Wait Protocol , Go-Bac...Transport layer protocols : Simple Protocol , Stop and Wait Protocol , Go-Bac...
Transport layer protocols : Simple Protocol , Stop and Wait Protocol , Go-Bac...
 
Transport layer services
Transport layer servicesTransport layer services
Transport layer services
 

Recently uploaded

Augmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxAugmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxMustafa Ahmed
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdfAldoGarca30
 
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...ronahami
 
fitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .pptfitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .pptAfnanAhmad53
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptxJIT KUMAR GUPTA
 
Memory Interfacing of 8086 with DMA 8257
Memory Interfacing of 8086 with DMA 8257Memory Interfacing of 8086 with DMA 8257
Memory Interfacing of 8086 with DMA 8257subhasishdas79
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Ramkumar k
 
Post office management system project ..pdf
Post office management system project ..pdfPost office management system project ..pdf
Post office management system project ..pdfKamal Acharya
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxSCMS School of Architecture
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaOmar Fathy
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 
UNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxUNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxkalpana413121
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network DevicesChandrakantDivate1
 
Introduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdfIntroduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdfsumitt6_25730773
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsvanyagupta248
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayEpec Engineered Technologies
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...drmkjayanthikannan
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxpritamlangde
 

Recently uploaded (20)

Augmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxAugmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptx
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
 
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
 
fitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .pptfitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .ppt
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
Memory Interfacing of 8086 with DMA 8257
Memory Interfacing of 8086 with DMA 8257Memory Interfacing of 8086 with DMA 8257
Memory Interfacing of 8086 with DMA 8257
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)
 
Post office management system project ..pdf
Post office management system project ..pdfPost office management system project ..pdf
Post office management system project ..pdf
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
Signal Processing and Linear System Analysis
Signal Processing and Linear System AnalysisSignal Processing and Linear System Analysis
Signal Processing and Linear System Analysis
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
UNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxUNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptx
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
Introduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdfIntroduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdf
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptx
 

Java Programming : introduction

  • 1. 1 JAVA PROGRAMMING By Dr.T.Abirami Associate Professor Department of IT Kongu Engineering College Perundurai 2/3/2021
  • 3. Author ,Year and Company  Started in 1995 by SUN Microsystems  James gosling, Arthur Van hoff, Andy bechtolsheim 3 James Gosling Oak is a symbol of strength 2/3/2021
  • 4. Java Indroduction  It is programming language  It is class based and object oriented programming language  It is a platform independent language  Java is both compiler and interpreter language  Java follows a bottom-up approach 4 2/3/2021
  • 5. Real-World Java Applications  Desktop GUI Applications  Android Apps  Web Applications  Software Tools  Trading Application  J2ME Apps  Embedded Space  Big Data technologies  Scientific Applications 5 2/3/2021
  • 6. Example  Banking: To deal with transaction management.  Retail: Billing applications that you see in a store/restaurant are completely written in Java.  Information Technology: Java is designed to solve implementation dependencies.  Android: Applications are either written in Java or use Java API.  Financial services: It is used in server-side applications.  Stock market: To write algorithms as to which company they should invest in.  Big Data: Hadoop MapReduce framework is written using Java.  Scientific and Research Community: To deal with huge amount of data. 6 2/3/2021
  • 7. Application  Desktop Applications such as acrobat reader, media player, antivirus, etc.  Web Applications  Enterprise Applications such as banking applications.  Mobile  Embedded System  Smart Card  Robotics  Games, etc. 7 2/3/2021
  • 8. Where it is used?  1. Google's (Gmail & Youtube) is built on Java/some other lang. 2. Twitter (Netty) & Linkedin uses Java & Scala. 3. Amazon, Ebay, Blogger uses almost Java. 8 2/3/2021
  • 9. Types of Java Applications  1) Standalone Application  2) Web Application  3) Enterprise Application  4) Mobile Application 9 2/3/2021
  • 10. Java Editions  1) Java SE (Java Standard Edition) - It is a Java programming platform.  2) Java EE (Java Enterprise Edition) - It is an enterprise platform which is mainly used to develop web and enterprise applications.  3) Java ME (Java Micro Edition) - to develop mobile applications.  4) JavaFX-to develop rich internet applications. 10 2/3/2021
  • 11. Popular companies  Uber  Airbnb  Google  Pinterest  Netflix  Spotify  Amazon  Slack  Instagram, etc. 11 2/3/2021
  • 12. Java Version History  JDK Alpha and Beta (1995)  JDK 1.0 (23rd Jan 1996)  JDK 1.1 (19th Feb 1997)  J2SE 1.2 (8th Dec 1998)  J2SE 1.3 (8th May 2000)  J2SE 1.4 (6th Feb 2002)  J2SE 5.0 (30th Sep 2004)  Java SE 6 (11th Dec 2006)  Java SE 7 (28th July 2011)  Java SE 8 (18th Mar 2014)  Java SE 9 (21st Sep 2017)  Java SE 10 (20th Mar 2018)  Java SE 11 and 14 ,15 12 2/3/2021
  • 13. A Step By Step Guide To How To Setup Eclipse IDE On Windows?  Install Java  Setup Eclipse IDE on Windows  Hello World Program 13 2/3/2021
  • 14. How to Download and Install Eclipse to Run Java  Step 1: Go to the Java Downloads Page and click on the option of Download. https://www.oracle.com/in/java/technologies/jav ase-downloads.html  2. Setup path 14 2/3/2021
  • 15. Set the path for Java(JDK)  Step 2: Once the installation is over follow the below instructions to set the path of the file.  Go to start and search for ‘System’. Then, click on ‘System’ and go to Advanced System Settings. Refer below. 15 2/3/2021
  • 16. Now, click on ‘Environment Variables’ under ‘Advanced’ tab as shown below: 16 2/3/2021
  • 18. JDK, JRE, and JVM JVM  JVM (Java Virtual Machine) is an abstract machine.  It is called a virtual machine because it doesn't physically exist.  It is a specification that provides a runtime environment in which Java bytecode can be executed.  It can also run those programs which are written in other languages and compiled to Java bytecode. 18 2/3/2021
  • 19. The JVM performs the following main tasks:  Loads code  Verifies code  Executes code  Provides runtime environment 19 Execution Engine :It contains: • A virtual processor • Interpreter: Read bytecode stream then execute the instructions. • Just-In-Time(JIT) compiler: •It is used to improve the performance. •JIT compiles parts of the byte code that have similar functionality at the same time, and hence reduces the amount of time needed for compilation. • Here, the term "compiler" refers to a translator from the instruction set of a Java virtual machine (JVM) to the instruction set of a specific CPU. 2/3/2021
  • 20. JRE  JRE is an acronym for Java Runtime Environment.  It is also written as Java RTE.  It is a set of software tools which are used for developing Java applications.  It is used to provide the runtime environment.  It is the implementation of JVM.  It physically exists.  It contains a set of libraries + other files that JVM uses at runtime. 20 2/3/2021
  • 21. JDK(Java Development Kit)  It is a software development environment which is used to develop Java applications and applets.  It physically exists.  It contains JRE + development tools.  The JDK contains a private Java Virtual Machine (JVM) and a few other resources such as an interpreter/loader (java), a compiler (javac), an archiver (jar), a documentation generator (Javadoc), etc. to complete the development of a Java Application. 21 2/3/2021
  • 22. Learning Objectives  To learn why Java is useful for the design of desktop , web and mobile applications.  To learn how to implement object-oriented designs with Java.  To identify Java language components and how they work together in applications.  To design and program stand-alone Java applications.  To learn how to design a graphical user interface (GUI) with Java AWT.  To learn how to extend Java classes with inheritance and dynamic binding.  To learn how to use exception handling in Java applications.  To learn Java generics and how to use the Java Collections API.  To understand how to design applications with threads in Java.  To learn how to read and write files in Java. 22 2/3/2021
  • 26. 26 First Program public class HelloWorld { public static void main(String args[]) { System.out.println("Hello World"); } } 2/3/2021
  • 27. 27 Compiling and Running HelloWorld.java javac HelloWorld.java java HelloWorld HelloWorld.class compile run bytecode source code 2/3/2021
  • 28. Why is JAVA a platform independent language? 28 platform is the computer and the operating system running on it. The operating system can be Windows, Mac, Linux, or any of many others It provides the environment to run the program 2/3/2021
  • 29. Compiled Programs With Different Operating Systems Windows compiler Executable (Windows) UNIX compiler Executable (UNIX) Mac OS compiler Executable (Mac) Computer program 29 2/3/2021
  • 30. A High Level View Of Translating/Executing Java Programs Java compiler (javac) Java program Filename.java Java bytecode (generic binary) Filename.class Stage 1: Compilation 30 2/3/2021
  • 31. A High Level View Of Translating/Executing Java Programs (2) Java interpreter (java) Java bytecode (generic binary) Filename.class Machine language instruction (UNIX) Machine language instruction (Windows) Machine language instruction (Apple) Stage 2: Interpreting and executing the byte code 31 2/3/2021
  • 32. Creating, Compiling And Running Java Programs On The Computer Science Network javac Java compiler Java byte code filename.class (UNIX file) To compile the program at the command line type "javac filename.java" To run the interpreter, at the command line type "java filename" java Java Interpreter Type it in with the text editor of your choice filename.java (Unix file) Java program 32 2/3/2021
  • 33. Compiling The Smallest Java Program public class Smallest { public static void main (String[] args) { } } Smallest.java javac (Java byte code) 10000100000001000 00100100000001001 : : Smallest.class Type “javac Smallest.java” 33 2/3/2021
  • 34. Running The Smallest Java Program (Java byte code) 10000100000001000 00100100000001001 : : Smallest.class java Type “java Smallest” (Platform/Operating specific binary 10100111000001000 00100111001111001 : : 34 2/3/2021
  • 35. 35 Notice:  Java is CASE SENSITIVE!!  File name has to be the same as class name in file.  Need to import necessary class definitions 2/3/2021