SlideShare a Scribd company logo
Programming in Java
5-day workshop
What is Java?
Matt Collison
JP Morgan Chase 2021
PiJ1.1: What is Java
Session overview
What is Java?
• General purpose
• High-level compiled
• Strongly typed object-oriented
Who uses Java?
• popularity TIOBE index
• Java history
Getting started with Java?
• Java download and versions
• The javac Java compiler
• A first Java program - Hello world
What is Java?
Java is a general purpose, high-level, compiled,
strongly typed, object oriented programming language.
1. general purpose
2. high-level
3. compiled
4. strongly typed
5. object oriented
General purpose – WORA
W – Write
O – Once
R – Run
A – Anywhere
How does Java achieve this?
• Java runs in a the JVM (Java Virtual Machine) as part of the JRE.
• JRE – The Java runtime environment is distributed with most modern OSs
and written in C.
• JDK – The Java Development Kit is not the JRE and needs to be downloaded.
1. general purpose
2. high-level
3. compiled
4. strongly typed
5. object oriented
High-level and compiled
1. general purpose
2. high-level
3. compiled
4. strongly typed
5. object oriented
Java
high level and compiled
Language
Java bytes
Ready to run!
JVM
Machine code
High level
Compiled
Object-Oriented
Three types of programming languages:
1. Procedural
2. Object Oriented
3. Functional
1. general purpose
2. high-level
3. compiled
4. strongly typed
5. object oriented
What is Java?
Java is a general purpose, high-level, compiled,
strongly typed, object oriented programming language.
1. general purpose
2. high-level
3. compiled
4. strongly typed
5. object oriented
How popular is Java?
https://www.tiobe.com/tiobe-index/
Pi j1.1 what-is-java
Java (brief) history
• Originally called Oak after a tree outside James Gosling’s office and
created in 1991.
• Launched as Java by Sun microsystems (now part of Oracle) in 1996.
• Continues to be developed primarily by Oracle
• Named after Java coffee
Java versions
Version Date
JDK Beta 1995
JDK1.0 January 23, 1996
JDK 1.1 February 19, 1997
J2SE 1.2 December 8, 1998
J2SE 1.3 May 8, 2000
J2SE 1.4 February 6, 2002
J2SE 5.0 September 30, 2004
Java SE 6 December 11, 2006
Java SE 7 July 28, 2011
Java SE 8 March 18, 2014
Java SE 9 September 21, 2017
Java SE 10 March 20, 2018
Java SE 11 September 25, 2018
Java SE 12 March 19, 2019
Java SE 13 September 17, 2019
Java SE 14 March 17, 2020
Java SE 15 September 15, 2020
Java SE 16 March 16, 2021
• We’re going to use Java 8
• Unless you’re feeling brave
• The Java SE (Standard Edition)
• There’s also an EE (Enterprise Edition)
Getting started – download/install the JDK
• Install the Java JDK – note this is not just the JRE (Java Runtime
Environment)
• https://www.oracle.com/uk/java/technologies/javase-downloads.html
Getting started – a Java program
• Let’s create a program!
• Open a text editor and
enter the following
program
• Save a…
HelloWorld.java
Getting started – compile and run
• Open a command-line and cd (change directory) to the location of
your file
• Run ls to check HelloWorld is in the current directory
• Compile your program with javac HelloWorld.java
• You should now see HelloWorld.class in the directory
Getting started – run your program
• Finally run your compiled program using:
java HelloWorld
Challenge
1. Change the program to print “Hello Java Workshop”
2. Try passing your program a command-line argument
• System.out.println(“Hello” + args[0])
• java HelloWorld Matt
Learning resources
The workshop homepage
https://mcollison.github.io/JPMC-java-intro-2021/
The course materials
https://mcollison.github.io/java-programming-foundations/
• Session worksheets – updated each week
Additional resources
• Think Java: How to think like a computer scientist
• Allen B Downey (O’Reilly Press)
• Available under Creative Commons license
• https://greenteapress.com/wp/think-java-2e/
• Oracle central Java Documentation –
https://docs.oracle.com/javase/8/docs/api/
• Other sources:
• W3Schools Java - https://www.w3schools.com/java/
• stack overflow - https://stackoverflow.com/
• Coding bat - https://codingbat.com/java

More Related Content

PPTX
Evolution of java By Abbas khan
PPT
Intro to Java Technology
PPT
Evolution Of Java
PPTX
Features of java
PPTX
Deploying Elastic Java EE Microservices in the Cloud with Docker
PPTX
Developing Java EE applications with NetBeans and Payara
PPTX
JPA 2.1 on Payara Server
PPTX
Java Programming Important Topics
Evolution of java By Abbas khan
Intro to Java Technology
Evolution Of Java
Features of java
Deploying Elastic Java EE Microservices in the Cloud with Docker
Developing Java EE applications with NetBeans and Payara
JPA 2.1 on Payara Server
Java Programming Important Topics

What's hot (15)

PPT
Java features
PPTX
Java Introduction
PPTX
Spring presentation
PDF
The New JavaScript: ES6
PDF
02 java programming features of java i
PDF
Skinny Framework 1.0.0
KEY
はじめてのspringframework
PPTX
What is java?
KEY
TSSJS 2011 - JRuby
PDF
Java Online Training
PDF
Java Online Training
PPTX
New Web Revolution - html5 and css3
PDF
[Start] Playing
PPTX
Basics of Java
PDF
Ruby on Rails Vs. ASP.NET MVC
Java features
Java Introduction
Spring presentation
The New JavaScript: ES6
02 java programming features of java i
Skinny Framework 1.0.0
はじめてのspringframework
What is java?
TSSJS 2011 - JRuby
Java Online Training
Java Online Training
New Web Revolution - html5 and css3
[Start] Playing
Basics of Java
Ruby on Rails Vs. ASP.NET MVC
Ad

Similar to Pi j1.1 what-is-java (20)

PPTX
Java Basics
PPT
The Evolution of Java
PPTX
OOP Lecture 1-Intro to Java.pptx
PPTX
1-Java Introduction, Features, Strcuture, Data Types-24-04-2023.pptx
PPTX
Manually exercising input combinations on the bench or with a microcontroller
PPTX
OOP - Lecture02 - Introduction to Java.pptx
PPTX
Java chapter 1 basic introduction Unit-1.pptx
PDF
Introduction to java (revised)
PPTX
JAVA_Day1_BasicIntroduction.pptx
PPTX
JAVAPart1_BasicIntroduction.pptx
PPTX
Pj01 2-install java and write first java program
PDF
Java Notes.pdfTells computer what to do. • These instructions are called code. •
PPTX
Java (1)
PDF
Introduction to java
PDF
Lec 3 01_aug13
PDF
Lecture-01 _Java Introduction CS 441 Fast
PPTX
Chapter-1 Introduction.pptx
PPTX
Java. converted (2)
PPT
introduction_to_core_elementry_java-1.ppt
PPT
Java introduction
Java Basics
The Evolution of Java
OOP Lecture 1-Intro to Java.pptx
1-Java Introduction, Features, Strcuture, Data Types-24-04-2023.pptx
Manually exercising input combinations on the bench or with a microcontroller
OOP - Lecture02 - Introduction to Java.pptx
Java chapter 1 basic introduction Unit-1.pptx
Introduction to java (revised)
JAVA_Day1_BasicIntroduction.pptx
JAVAPart1_BasicIntroduction.pptx
Pj01 2-install java and write first java program
Java Notes.pdfTells computer what to do. • These instructions are called code. •
Java (1)
Introduction to java
Lec 3 01_aug13
Lecture-01 _Java Introduction CS 441 Fast
Chapter-1 Introduction.pptx
Java. converted (2)
introduction_to_core_elementry_java-1.ppt
Java introduction
Ad

More from mcollison (11)

PPTX
Pi j4.2 software-reliability
PPTX
Pi j4.1 packages
PPTX
Pi j3.1 inheritance
PPTX
Pi j3.2 polymorphism
PPTX
Pi j3.4 data-structures
PPTX
Pi j2.3 objects
PPTX
Pi j2.2 classes
PPTX
Pi j1.0 workshop-introduction
PPTX
Pi j1.4 loops
PPTX
Pi j1.3 operators
PPTX
Pi j1.2 variable-assignment
Pi j4.2 software-reliability
Pi j4.1 packages
Pi j3.1 inheritance
Pi j3.2 polymorphism
Pi j3.4 data-structures
Pi j2.3 objects
Pi j2.2 classes
Pi j1.0 workshop-introduction
Pi j1.4 loops
Pi j1.3 operators
Pi j1.2 variable-assignment

Recently uploaded (20)

PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
Insiders guide to clinical Medicine.pdf
PDF
Classroom Observation Tools for Teachers
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Sports Quiz easy sports quiz sports quiz
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
RMMM.pdf make it easy to upload and study
PPTX
Lesson notes of climatology university.
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
Basic Mud Logging Guide for educational purpose
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PPTX
GDM (1) (1).pptx small presentation for students
PPH.pptx obstetrics and gynecology in nursing
Insiders guide to clinical Medicine.pdf
Classroom Observation Tools for Teachers
2.FourierTransform-ShortQuestionswithAnswers.pdf
Sports Quiz easy sports quiz sports quiz
Renaissance Architecture: A Journey from Faith to Humanism
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
RMMM.pdf make it easy to upload and study
Lesson notes of climatology university.
Pharmacology of Heart Failure /Pharmacotherapy of CHF
O7-L3 Supply Chain Operations - ICLT Program
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
STATICS OF THE RIGID BODIES Hibbelers.pdf
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Basic Mud Logging Guide for educational purpose
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
GDM (1) (1).pptx small presentation for students

Pi j1.1 what-is-java

  • 1. Programming in Java 5-day workshop What is Java? Matt Collison JP Morgan Chase 2021 PiJ1.1: What is Java
  • 2. Session overview What is Java? • General purpose • High-level compiled • Strongly typed object-oriented Who uses Java? • popularity TIOBE index • Java history Getting started with Java? • Java download and versions • The javac Java compiler • A first Java program - Hello world
  • 3. What is Java? Java is a general purpose, high-level, compiled, strongly typed, object oriented programming language. 1. general purpose 2. high-level 3. compiled 4. strongly typed 5. object oriented
  • 4. General purpose – WORA W – Write O – Once R – Run A – Anywhere How does Java achieve this? • Java runs in a the JVM (Java Virtual Machine) as part of the JRE. • JRE – The Java runtime environment is distributed with most modern OSs and written in C. • JDK – The Java Development Kit is not the JRE and needs to be downloaded. 1. general purpose 2. high-level 3. compiled 4. strongly typed 5. object oriented
  • 5. High-level and compiled 1. general purpose 2. high-level 3. compiled 4. strongly typed 5. object oriented Java high level and compiled Language Java bytes Ready to run! JVM Machine code High level Compiled
  • 6. Object-Oriented Three types of programming languages: 1. Procedural 2. Object Oriented 3. Functional 1. general purpose 2. high-level 3. compiled 4. strongly typed 5. object oriented
  • 7. What is Java? Java is a general purpose, high-level, compiled, strongly typed, object oriented programming language. 1. general purpose 2. high-level 3. compiled 4. strongly typed 5. object oriented
  • 8. How popular is Java? https://www.tiobe.com/tiobe-index/
  • 10. Java (brief) history • Originally called Oak after a tree outside James Gosling’s office and created in 1991. • Launched as Java by Sun microsystems (now part of Oracle) in 1996. • Continues to be developed primarily by Oracle • Named after Java coffee
  • 11. Java versions Version Date JDK Beta 1995 JDK1.0 January 23, 1996 JDK 1.1 February 19, 1997 J2SE 1.2 December 8, 1998 J2SE 1.3 May 8, 2000 J2SE 1.4 February 6, 2002 J2SE 5.0 September 30, 2004 Java SE 6 December 11, 2006 Java SE 7 July 28, 2011 Java SE 8 March 18, 2014 Java SE 9 September 21, 2017 Java SE 10 March 20, 2018 Java SE 11 September 25, 2018 Java SE 12 March 19, 2019 Java SE 13 September 17, 2019 Java SE 14 March 17, 2020 Java SE 15 September 15, 2020 Java SE 16 March 16, 2021 • We’re going to use Java 8 • Unless you’re feeling brave • The Java SE (Standard Edition) • There’s also an EE (Enterprise Edition)
  • 12. Getting started – download/install the JDK • Install the Java JDK – note this is not just the JRE (Java Runtime Environment) • https://www.oracle.com/uk/java/technologies/javase-downloads.html
  • 13. Getting started – a Java program • Let’s create a program! • Open a text editor and enter the following program • Save a… HelloWorld.java
  • 14. Getting started – compile and run • Open a command-line and cd (change directory) to the location of your file • Run ls to check HelloWorld is in the current directory • Compile your program with javac HelloWorld.java • You should now see HelloWorld.class in the directory
  • 15. Getting started – run your program • Finally run your compiled program using: java HelloWorld
  • 16. Challenge 1. Change the program to print “Hello Java Workshop” 2. Try passing your program a command-line argument • System.out.println(“Hello” + args[0]) • java HelloWorld Matt
  • 17. Learning resources The workshop homepage https://mcollison.github.io/JPMC-java-intro-2021/ The course materials https://mcollison.github.io/java-programming-foundations/ • Session worksheets – updated each week
  • 18. Additional resources • Think Java: How to think like a computer scientist • Allen B Downey (O’Reilly Press) • Available under Creative Commons license • https://greenteapress.com/wp/think-java-2e/ • Oracle central Java Documentation – https://docs.oracle.com/javase/8/docs/api/ • Other sources: • W3Schools Java - https://www.w3schools.com/java/ • stack overflow - https://stackoverflow.com/ • Coding bat - https://codingbat.com/java

Editor's Notes

  • #5: One of the main advantages of Java is that it’s cross platform (and open source). No vendor lock-in.
  • #6: The JVM is actually written in C
  • #7: Procedural – monolithic largely unstructured start to end step wise implementation of instructions Object-oriented – structured representation of state and functionality executed with careful consideration of representation and variables. Functional – structured and stateless. Everything is a function and there are no variables (only immutable constants) so there are no side effects and programs can be proofed. https://cscalfani.medium.com/so-you-want-to-be-a-functional-programmer-part-1-1f15e387e536
  • #9: Top three for 20 years.
  • #11: Good knowledge for pub quizzes, not so helpful for coding.
  • #13: It’s easier to use Oracle and often people are confused when they download from java.com Check
  • #18: All resources hang from the ELE pages. How many of you have looked through them?