SlideShare a Scribd company logo
Java Arrays
Primitives of the same data type
Marius Claassen
Java Arrays
About me
Marius Claassen, Java Developer and Teacher
I am a self-taught java developer. Having been a teacher for many
years, I am now working full-time as an independent software
instructor, making video tutorials. It is my mission to help others learn
programming in general and Java in particular.
2
Marius Claassen
Java Arrays
TOPICS:
1. Overview
2. One-Dimensional Arrays
3. Two-Dimensional Arrays
4. Class Project
3
Marius Claassen
Java Arrays
Lecture details
 Lesson topic
 Problem statement
 Coding solution
4
Marius Claassen
Java Arrays
To access this course:
• http://skl.sh/2n6ZrJL
or
• mariusclaassen@gmail.com
5
Marius Claassen
Java Arrays
TOPICS:
1. Overview
2. One-Dimensional Arrays
3. Two-Dimensional Arrays
4. Class Project
6
Marius Claassen
Java Arrays
Lecture 2: One-D arrays
0 1 2
11.5 14.9 17.2
7
indices
array length of 3
elements
Marius Claassen
Java Arrays
Lecture 2: One-D arrays
One-dimensional arrays problem statement:
Implement a one-dimensional double array
initialized with elements: 11.5 14.9 17.2 and
print all the elements.
// 11.5 14.9 17.2
8
Marius Claassen
Java Arrays
9
public class Lecture2 {
public static void main(String[] args) {
dStream.forEach(d-> System.out.print(d+“ ”);
double[] decimalNums = {11.5, 14.9, 17.2};
decimalNums);
DoubleStream dStream = Arrays.stream(
}
}
// 11.5 14.9 17.2
Marius Claassen
Java Arrays
TOPICS:
1. Overview
2. One-Dimensional Arrays
3. Two-Dimensional Arrays
4. Class Project
10
Marius Claassen
Java Arrays
0 1 2 3 4
alpha bravo charlie delta echo 0
foxtrot golf hotel india juliet 1
kilo lima mike november oscar 2
papa quebec romeo sierra tango 3
11
4 Rows
5 Columns
Marius Claassen
Java Arrays
Lecture 3: Two-D arrays
Two-dimensional arrays problem statement:
Implement a two-dimensional String array
and print out the element in row 1, column 3.
// india
12
Marius Claassen
Java Arrays
13
public class Lecture3 {
public static void main(String[] args) {
{“kilo”, “lima”, “mike”, “november”, “oscar”},
String[][] phoneticAlphabet = {
{“foxtrot”, “golf”, “hotel”, “india”, “juliet”},
{“alpha”, “bravo”, “charlie”, “delta”, “echo”},
{“papa”, “quebec”, “romeo”, “siera”, “tango”}
}; System.out.print(phoneticAlphabet[1][3]);
} } // india
Marius Claassen
Java Arrays
TOPICS:
1. Overview
2. One-Dimensional Arrays
3. Two-Dimensional Arrays
4. Class Project
14
Marius Claassen
Java Arrays
Lecture 4: Project
Albania, Brazil, China, Denmark
Egypt, Belarus, France, Greece
Hungary, Israel, Japan, Kenya
Libya, Mexico, Namibia, Peru
Write a Java program that implements a suitable
array and print the element at row two, column
one.
15
Marius Claassen
Java Arrays
To access this course:
• http://skl.sh/2n6ZrJL
or
• mariusclaassen@gmail.com
16
Marius Claassen
Java Arrays
Java Arrays
Primitives of the same data type
Marius Claassen
Java Arrays

More Related Content

Similar to Java Arrays

"What's New in HotSpot JVM 8" @ JPoint 2014, Moscow, Russia
"What's New in HotSpot JVM 8" @ JPoint 2014, Moscow, Russia "What's New in HotSpot JVM 8" @ JPoint 2014, Moscow, Russia
"What's New in HotSpot JVM 8" @ JPoint 2014, Moscow, Russia Vladimir Ivanov
 
Scala Frustrations
Scala FrustrationsScala Frustrations
Scala Frustrations
takezoe
 
Automated Scaling of Microservice Stacks for JavaEE Applications
Automated Scaling of Microservice Stacks for JavaEE ApplicationsAutomated Scaling of Microservice Stacks for JavaEE Applications
Automated Scaling of Microservice Stacks for JavaEE Applications
Jelastic Multi-Cloud PaaS
 
Java 101 intro to programming with java
Java 101  intro to programming with javaJava 101  intro to programming with java
Java 101 intro to programming with java
Hawkman Academy
 
Java 101 Intro to Java Programming
Java 101 Intro to Java ProgrammingJava 101 Intro to Java Programming
Java 101 Intro to Java Programming
agorolabs
 
Dr scalalove: How I learned to stop worrying and love the functions
Dr scalalove: How I learned to stop worrying and love the functionsDr scalalove: How I learned to stop worrying and love the functions
Dr scalalove: How I learned to stop worrying and love the functions
Dianne Marsh
 
Live coding scala 'the java of the future'
Live coding scala 'the java of the future'Live coding scala 'the java of the future'
Live coding scala 'the java of the future'Xebia Nederland BV
 
Koalas: Pandas on Apache Spark
Koalas: Pandas on Apache SparkKoalas: Pandas on Apache Spark
Koalas: Pandas on Apache Spark
Databricks
 
Polyglot JVM
Polyglot JVMPolyglot JVM
Polyglot JVM
Arturo Herrero
 
Training course lect2
Training course lect2Training course lect2
Training course lect2
Noor Dhiya
 
Cassandra and Rails at LA NoSQL Meetup
Cassandra and Rails at LA NoSQL MeetupCassandra and Rails at LA NoSQL Meetup
Cassandra and Rails at LA NoSQL Meetup
Michael Wynholds
 
Apache Maven supports ALL Java (Javaland 2019)
Apache Maven supports ALL Java (Javaland 2019)Apache Maven supports ALL Java (Javaland 2019)
Apache Maven supports ALL Java (Javaland 2019)
Robert Scholte
 
Devoxx
DevoxxDevoxx
Build 3 JavaFX Apps
Build 3 JavaFX AppsBuild 3 JavaFX Apps
Build 3 JavaFX Apps
Marius Claassen
 
Apache Maven supports all Java (JokerConf 2018)
Apache Maven supports all Java (JokerConf 2018)Apache Maven supports all Java (JokerConf 2018)
Apache Maven supports all Java (JokerConf 2018)
Robert Scholte
 
Scala final ppt vinay
Scala final ppt vinayScala final ppt vinay
Scala final ppt vinay
Viplav Jain
 
Rubyslava - scala pattern matching
Rubyslava - scala pattern matchingRubyslava - scala pattern matching
Rubyslava - scala pattern matching
Andrea Šteňová
 
Scala elegant and exotic part 1
Scala  elegant and exotic part 1Scala  elegant and exotic part 1
Scala elegant and exotic part 1
VulcanMinds
 
Running 400-node Cassandra + Spark Clusters in Azure (Anubhav Kale, Microsoft...
Running 400-node Cassandra + Spark Clusters in Azure (Anubhav Kale, Microsoft...Running 400-node Cassandra + Spark Clusters in Azure (Anubhav Kale, Microsoft...
Running 400-node Cassandra + Spark Clusters in Azure (Anubhav Kale, Microsoft...
DataStax
 
Creating Responsive Drupal Sites with Zen Grids and the Zen 5 Theme
Creating Responsive Drupal Sites with Zen Grids and the Zen 5 ThemeCreating Responsive Drupal Sites with Zen Grids and the Zen 5 Theme
Creating Responsive Drupal Sites with Zen Grids and the Zen 5 Theme
Acquia
 

Similar to Java Arrays (20)

"What's New in HotSpot JVM 8" @ JPoint 2014, Moscow, Russia
"What's New in HotSpot JVM 8" @ JPoint 2014, Moscow, Russia "What's New in HotSpot JVM 8" @ JPoint 2014, Moscow, Russia
"What's New in HotSpot JVM 8" @ JPoint 2014, Moscow, Russia
 
Scala Frustrations
Scala FrustrationsScala Frustrations
Scala Frustrations
 
Automated Scaling of Microservice Stacks for JavaEE Applications
Automated Scaling of Microservice Stacks for JavaEE ApplicationsAutomated Scaling of Microservice Stacks for JavaEE Applications
Automated Scaling of Microservice Stacks for JavaEE Applications
 
Java 101 intro to programming with java
Java 101  intro to programming with javaJava 101  intro to programming with java
Java 101 intro to programming with java
 
Java 101 Intro to Java Programming
Java 101 Intro to Java ProgrammingJava 101 Intro to Java Programming
Java 101 Intro to Java Programming
 
Dr scalalove: How I learned to stop worrying and love the functions
Dr scalalove: How I learned to stop worrying and love the functionsDr scalalove: How I learned to stop worrying and love the functions
Dr scalalove: How I learned to stop worrying and love the functions
 
Live coding scala 'the java of the future'
Live coding scala 'the java of the future'Live coding scala 'the java of the future'
Live coding scala 'the java of the future'
 
Koalas: Pandas on Apache Spark
Koalas: Pandas on Apache SparkKoalas: Pandas on Apache Spark
Koalas: Pandas on Apache Spark
 
Polyglot JVM
Polyglot JVMPolyglot JVM
Polyglot JVM
 
Training course lect2
Training course lect2Training course lect2
Training course lect2
 
Cassandra and Rails at LA NoSQL Meetup
Cassandra and Rails at LA NoSQL MeetupCassandra and Rails at LA NoSQL Meetup
Cassandra and Rails at LA NoSQL Meetup
 
Apache Maven supports ALL Java (Javaland 2019)
Apache Maven supports ALL Java (Javaland 2019)Apache Maven supports ALL Java (Javaland 2019)
Apache Maven supports ALL Java (Javaland 2019)
 
Devoxx
DevoxxDevoxx
Devoxx
 
Build 3 JavaFX Apps
Build 3 JavaFX AppsBuild 3 JavaFX Apps
Build 3 JavaFX Apps
 
Apache Maven supports all Java (JokerConf 2018)
Apache Maven supports all Java (JokerConf 2018)Apache Maven supports all Java (JokerConf 2018)
Apache Maven supports all Java (JokerConf 2018)
 
Scala final ppt vinay
Scala final ppt vinayScala final ppt vinay
Scala final ppt vinay
 
Rubyslava - scala pattern matching
Rubyslava - scala pattern matchingRubyslava - scala pattern matching
Rubyslava - scala pattern matching
 
Scala elegant and exotic part 1
Scala  elegant and exotic part 1Scala  elegant and exotic part 1
Scala elegant and exotic part 1
 
Running 400-node Cassandra + Spark Clusters in Azure (Anubhav Kale, Microsoft...
Running 400-node Cassandra + Spark Clusters in Azure (Anubhav Kale, Microsoft...Running 400-node Cassandra + Spark Clusters in Azure (Anubhav Kale, Microsoft...
Running 400-node Cassandra + Spark Clusters in Azure (Anubhav Kale, Microsoft...
 
Creating Responsive Drupal Sites with Zen Grids and the Zen 5 Theme
Creating Responsive Drupal Sites with Zen Grids and the Zen 5 ThemeCreating Responsive Drupal Sites with Zen Grids and the Zen 5 Theme
Creating Responsive Drupal Sites with Zen Grids and the Zen 5 Theme
 

More from Marius Claassen

What does apr mean
What does apr meanWhat does apr mean
What does apr mean
Marius Claassen
 
Java for beginners programming course
Java for beginners programming courseJava for beginners programming course
Java for beginners programming course
Marius Claassen
 
Java for beginners programming course (updated)
Java for beginners programming course (updated)Java for beginners programming course (updated)
Java for beginners programming course (updated)
Marius Claassen
 
Java for complete beginners programming course
Java for complete beginners programming courseJava for complete beginners programming course
Java for complete beginners programming course
Marius Claassen
 
Java 8 for complete beginners
Java 8 for complete beginnersJava 8 for complete beginners
Java 8 for complete beginners
Marius Claassen
 
Java for Beginners Programming course
Java for Beginners Programming courseJava for Beginners Programming course
Java for Beginners Programming course
Marius Claassen
 
Java 8 for complete beginners programming course
Java 8 for complete beginners programming courseJava 8 for complete beginners programming course
Java 8 for complete beginners programming course
Marius Claassen
 

More from Marius Claassen (7)

What does apr mean
What does apr meanWhat does apr mean
What does apr mean
 
Java for beginners programming course
Java for beginners programming courseJava for beginners programming course
Java for beginners programming course
 
Java for beginners programming course (updated)
Java for beginners programming course (updated)Java for beginners programming course (updated)
Java for beginners programming course (updated)
 
Java for complete beginners programming course
Java for complete beginners programming courseJava for complete beginners programming course
Java for complete beginners programming course
 
Java 8 for complete beginners
Java 8 for complete beginnersJava 8 for complete beginners
Java 8 for complete beginners
 
Java for Beginners Programming course
Java for Beginners Programming courseJava for Beginners Programming course
Java for Beginners Programming course
 
Java 8 for complete beginners programming course
Java 8 for complete beginners programming courseJava 8 for complete beginners programming course
Java 8 for complete beginners programming course
 

Recently uploaded

Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 

Recently uploaded (20)

Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 

Java Arrays

  • 1. Java Arrays Primitives of the same data type Marius Claassen Java Arrays
  • 2. About me Marius Claassen, Java Developer and Teacher I am a self-taught java developer. Having been a teacher for many years, I am now working full-time as an independent software instructor, making video tutorials. It is my mission to help others learn programming in general and Java in particular. 2 Marius Claassen Java Arrays
  • 3. TOPICS: 1. Overview 2. One-Dimensional Arrays 3. Two-Dimensional Arrays 4. Class Project 3 Marius Claassen Java Arrays
  • 4. Lecture details  Lesson topic  Problem statement  Coding solution 4 Marius Claassen Java Arrays
  • 5. To access this course: • http://skl.sh/2n6ZrJL or • mariusclaassen@gmail.com 5 Marius Claassen Java Arrays
  • 6. TOPICS: 1. Overview 2. One-Dimensional Arrays 3. Two-Dimensional Arrays 4. Class Project 6 Marius Claassen Java Arrays
  • 7. Lecture 2: One-D arrays 0 1 2 11.5 14.9 17.2 7 indices array length of 3 elements Marius Claassen Java Arrays
  • 8. Lecture 2: One-D arrays One-dimensional arrays problem statement: Implement a one-dimensional double array initialized with elements: 11.5 14.9 17.2 and print all the elements. // 11.5 14.9 17.2 8 Marius Claassen Java Arrays
  • 9. 9 public class Lecture2 { public static void main(String[] args) { dStream.forEach(d-> System.out.print(d+“ ”); double[] decimalNums = {11.5, 14.9, 17.2}; decimalNums); DoubleStream dStream = Arrays.stream( } } // 11.5 14.9 17.2 Marius Claassen Java Arrays
  • 10. TOPICS: 1. Overview 2. One-Dimensional Arrays 3. Two-Dimensional Arrays 4. Class Project 10 Marius Claassen Java Arrays
  • 11. 0 1 2 3 4 alpha bravo charlie delta echo 0 foxtrot golf hotel india juliet 1 kilo lima mike november oscar 2 papa quebec romeo sierra tango 3 11 4 Rows 5 Columns Marius Claassen Java Arrays
  • 12. Lecture 3: Two-D arrays Two-dimensional arrays problem statement: Implement a two-dimensional String array and print out the element in row 1, column 3. // india 12 Marius Claassen Java Arrays
  • 13. 13 public class Lecture3 { public static void main(String[] args) { {“kilo”, “lima”, “mike”, “november”, “oscar”}, String[][] phoneticAlphabet = { {“foxtrot”, “golf”, “hotel”, “india”, “juliet”}, {“alpha”, “bravo”, “charlie”, “delta”, “echo”}, {“papa”, “quebec”, “romeo”, “siera”, “tango”} }; System.out.print(phoneticAlphabet[1][3]); } } // india Marius Claassen Java Arrays
  • 14. TOPICS: 1. Overview 2. One-Dimensional Arrays 3. Two-Dimensional Arrays 4. Class Project 14 Marius Claassen Java Arrays
  • 15. Lecture 4: Project Albania, Brazil, China, Denmark Egypt, Belarus, France, Greece Hungary, Israel, Japan, Kenya Libya, Mexico, Namibia, Peru Write a Java program that implements a suitable array and print the element at row two, column one. 15 Marius Claassen Java Arrays
  • 16. To access this course: • http://skl.sh/2n6ZrJL or • mariusclaassen@gmail.com 16 Marius Claassen Java Arrays
  • 17. Java Arrays Primitives of the same data type Marius Claassen Java Arrays