SlideShare a Scribd company logo
4
Most read
7
Most read
13
Most read
Arrays
Dr. Kuppusamy .P
Associate Professor / SCOPE
Access Specifiers / modifier in Java
• Defines an access scope of the variable, methods and classes.
• Can change the access level of fields, constructors, methods, and
class by applying the access modifier on it.
1. Public: Accessible from any other class, methods or interface.
2. Private: Accessible within the class or method where it is
defined.
3. Protected: Accessible in the same class or its child class or in all
those classes which are defined in the same package.
4. Default: When none of the access specifiers is specified. Can be
accessed by all classes which are defined in same package only.
Dr. Kuppusamy P
Access Specifiers / modifier in Java
Dr. Kuppusamy P
Access
Modifier
within
class within
package
outside
package by
subclass
only
outside
package
Private Y N N N
Default Y Y N N
Protected Y Y Y N
Public Y Y Y Y
Arrays
• Array is a container object that contains a finite number of values
of a similar data type .
• When an array is created
• The length (size) of an array is fixed
• Array elements are automatically initialized with the default
value of their data type
• Two types
• One dimensional Array
• Multi-dimensional Array
• 2D Array, 3D Array
Dr. Kuppusamy P
One Dimensional Array
• Syntax:
• data-type[] variable = new data-type[array_length]
• Eg. int[] a = new int[6]; //define integer array with size 6
Dr. Kuppusamy P
Create and Initialize Array
• Create and initialize array as below
o int[] x = {10, 20, 30};
o int[] x = new int[] {10, 20, 30};
• Here the length of an array is determined by the number of
values provided between { and }.
• The built-in length property determines the size of any array
• E.g.
o int[] x = new int[10];
oint x_len = x.length;
Dr. Kuppusamy P
Example - Array
public class ArrayEx
{
public static void main(String[] args)
{
int[] marks; // declares an array of integers
marks = new int[5]; // allocates memory for 5integers
marks[0] = 11;
marks[4] = 22;
System.out.println("Element at index 0: " + marks[0]);
System.out.println("Element at index 1: " + marks[1]);
System.out.println("Element at index 4: " + marks[4]);
}
} Dr. Kuppusamy P
Array bounds and Array Resizing
• Array index (subscripts) begins with 0
• Can't access an array element beyond the defined range.
• Can't resize an array.
• Can use the same reference variable to refer new array.
• int x[] = new int[5];
• x= new int[10];
Dr. Kuppusamy P
Copying Array
• To copy array elements from one array to another array, use
arraycopy static method from System class.
Syntax:
public static void arraycopy(Object s, int sIndex, Object d, int dIndex, int length)
Ex:
int source[] = {1, 2, 3, 4, 5, 6};
int dest[] = new int[10];
System.arraycopy(source, 0, dest, 0, source.length);
Dr. Kuppusamy P
Two-Dimensional Array
• Two-dimensional array is a collection of 1-Dimensional arrays.
• Initializing two-dimensional arrays:
int[][] y = new int[2][4];
• The 1st dimension represent rows or number of one dimension
• The 2nd dimension represent columns or number of elements in the each one
dimensions
Jagged Array:
• Column representation is optional in two dimensional arrays.
int[][] y = new int[3][]
• The curly braces { } may also be used to initialize two dimensional arrays.
Eg: int[][] y = { {1,2,3}, {4,5,6}, {7,8,9} };
int[][] y = new int[3][]
Dr. Kuppusamy P
Two-Dimensional Array
• Array can be initialized with the row dimension and without initializing the
columns, but not vice versa
• int[][] x = new int[3][];
• int[][] x = new int[][3]; //error
• The length of the columns can vary for each row and initialize number of
columns in each row
Ex1:
• int [][] numbers = new int [3][];
• numbers[0] = new int[] {6,9,3,7}; //row1
• numbers[1] = new int [] {5,2} // row2
• numbers[2] = new int [] {8,4,1}; // row3
Dr. Kuppusamy P
Example: 2D-Array
public class TwoD
{
public static void main(String[] args)
{
int [][] x = new int[3][]; // initialize number of rows
x[0] = new int[3]; // define number of columns in each row
x[1] = new int[2];
x[2] = new int[5];
for(int i=0; i < x.length; i++) // print array elements
{
for (int j=0; j < x[i].length; j++)
{
x[i][j] = i;
System.out.print(x[i][j]+ ” “);
}
System.out.println();
}
}
}
Dr. Kuppusamy P
References
Dr. Kuppusamy P
Herbert Schildt, “Java: The Complete Reference”, McGraw-Hill Education, Tenth edition,
2017.
Ad

Recommended

Arrays in Java
Arrays in Java
Naz Abdalla
 
Classes, objects in JAVA
Classes, objects in JAVA
Abhilash Nair
 
Java string handling
Java string handling
Salman Khan
 
Python programming : Arrays
Python programming : Arrays
Emertxe Information Technologies Pvt Ltd
 
stack & queue
stack & queue
manju rani
 
This keyword in java
This keyword in java
Hitesh Kumar
 
Threads in JAVA
Threads in JAVA
Haldia Institute of Technology
 
Constructor and Types of Constructors
Constructor and Types of Constructors
Dhrumil Panchal
 
Chapter 02: Classes Objects and Methods Java by Tushar B Kute
Chapter 02: Classes Objects and Methods Java by Tushar B Kute
Tushar B Kute
 
Arrays in java
Arrays in java
bhavesh prakash
 
Lecture_7-Encapsulation in Java.pptx
Lecture_7-Encapsulation in Java.pptx
ShahinAhmed49
 
Applet life cycle
Applet life cycle
myrajendra
 
Strings in java
Strings in java
Kuppusamy P
 
Ppt on this and super keyword
Ppt on this and super keyword
tanu_jaswal
 
Wrapper classes
Wrapper classes
Ravi_Kant_Sahu
 
2- Dimensional Arrays
2- Dimensional Arrays
Education Front
 
Multithreading in java
Multithreading in java
Monika Mishra
 
Java Arrays
Java Arrays
OXUS 20
 
Oops concept on c#
Oops concept on c#
baabtra.com - No. 1 supplier of quality freshers
 
Two-dimensional array in java
Two-dimensional array in java
Talha mahmood
 
SQL
SQL
Vineeta Garg
 
Array in c language
Array in c language
home
 
Stack
Stack
Seema Sharma
 
Class and Objects in Java
Class and Objects in Java
Spotle.ai
 
Method overloading
Method overloading
Lovely Professional University
 
Operator overloading
Operator overloading
Ramish Suleman
 
C string
C string
University of Potsdam
 
Java interfaces
Java interfaces
Raja Sekhar
 
OOPs with java
OOPs with java
AAKANKSHA JAIN
 
L10 array
L10 array
teach4uin
 

More Related Content

What's hot (20)

Chapter 02: Classes Objects and Methods Java by Tushar B Kute
Chapter 02: Classes Objects and Methods Java by Tushar B Kute
Tushar B Kute
 
Arrays in java
Arrays in java
bhavesh prakash
 
Lecture_7-Encapsulation in Java.pptx
Lecture_7-Encapsulation in Java.pptx
ShahinAhmed49
 
Applet life cycle
Applet life cycle
myrajendra
 
Strings in java
Strings in java
Kuppusamy P
 
Ppt on this and super keyword
Ppt on this and super keyword
tanu_jaswal
 
Wrapper classes
Wrapper classes
Ravi_Kant_Sahu
 
2- Dimensional Arrays
2- Dimensional Arrays
Education Front
 
Multithreading in java
Multithreading in java
Monika Mishra
 
Java Arrays
Java Arrays
OXUS 20
 
Oops concept on c#
Oops concept on c#
baabtra.com - No. 1 supplier of quality freshers
 
Two-dimensional array in java
Two-dimensional array in java
Talha mahmood
 
SQL
SQL
Vineeta Garg
 
Array in c language
Array in c language
home
 
Stack
Stack
Seema Sharma
 
Class and Objects in Java
Class and Objects in Java
Spotle.ai
 
Method overloading
Method overloading
Lovely Professional University
 
Operator overloading
Operator overloading
Ramish Suleman
 
C string
C string
University of Potsdam
 
Java interfaces
Java interfaces
Raja Sekhar
 

Similar to Java arrays (20)

OOPs with java
OOPs with java
AAKANKSHA JAIN
 
L10 array
L10 array
teach4uin
 
javaArrays.pptx
javaArrays.pptx
AshishNayyar11
 
dizital pods session 6-arrays.ppsx
dizital pods session 6-arrays.ppsx
VijayKumarLokanadam
 
dizital pods session 6-arrays.pptx
dizital pods session 6-arrays.pptx
VijayKumarLokanadam
 
6_Array.pptx
6_Array.pptx
shafat6712
 
Arrays in programming
Arrays in programming
TaseerRao
 
Array
Array
Ravi_Kant_Sahu
 
Java arrays
Java arrays
BHUVIJAYAVELU
 
Lecture 7 arrays
Lecture 7 arrays
manish kumar
 
Learn Java Part 9
Learn Java Part 9
Gurpreet singh
 
Core java day2
Core java day2
Soham Sengupta
 
Java Programming
Java Programming
Nanthini Kempaiyan
 
Data Structure Midterm Lesson Arrays
Data Structure Midterm Lesson Arrays
Maulen Bale
 
Arrays a detailed explanation and presentation
Arrays a detailed explanation and presentation
riazahamed37
 
Arrays
Arrays
Trupti Agrawal
 
Java Arrays
Java Arrays
Soba Arjun
 
Array.pptx
Array.pptx
ssuser8698eb
 
the array, which stores a fixed-size sequential collection of elements of the...
the array, which stores a fixed-size sequential collection of elements of the...
Kavitha S
 
Java R20 - UNIT-3.docx
Java R20 - UNIT-3.docx
Pamarthi Kumar
 
dizital pods session 6-arrays.ppsx
dizital pods session 6-arrays.ppsx
VijayKumarLokanadam
 
dizital pods session 6-arrays.pptx
dizital pods session 6-arrays.pptx
VijayKumarLokanadam
 
Arrays in programming
Arrays in programming
TaseerRao
 
Data Structure Midterm Lesson Arrays
Data Structure Midterm Lesson Arrays
Maulen Bale
 
Arrays a detailed explanation and presentation
Arrays a detailed explanation and presentation
riazahamed37
 
the array, which stores a fixed-size sequential collection of elements of the...
the array, which stores a fixed-size sequential collection of elements of the...
Kavitha S
 
Java R20 - UNIT-3.docx
Java R20 - UNIT-3.docx
Pamarthi Kumar
 
Ad

More from Kuppusamy P (20)

Recurrent neural networks rnn
Recurrent neural networks rnn
Kuppusamy P
 
Deep learning
Deep learning
Kuppusamy P
 
Image segmentation
Image segmentation
Kuppusamy P
 
Image enhancement
Image enhancement
Kuppusamy P
 
Feature detection and matching
Feature detection and matching
Kuppusamy P
 
Image processing, Noise, Noise Removal filters
Image processing, Noise, Noise Removal filters
Kuppusamy P
 
Flowchart design for algorithms
Flowchart design for algorithms
Kuppusamy P
 
Algorithm basics
Algorithm basics
Kuppusamy P
 
Problem solving using Programming
Problem solving using Programming
Kuppusamy P
 
Parts of Computer, Hardware and Software
Parts of Computer, Hardware and Software
Kuppusamy P
 
Java methods or Subroutines or Functions
Java methods or Subroutines or Functions
Kuppusamy P
 
Java iterative statements
Java iterative statements
Kuppusamy P
 
Java conditional statements
Java conditional statements
Kuppusamy P
 
Java data types
Java data types
Kuppusamy P
 
Java introduction
Java introduction
Kuppusamy P
 
Logistic regression in Machine Learning
Logistic regression in Machine Learning
Kuppusamy P
 
Anomaly detection (Unsupervised Learning) in Machine Learning
Anomaly detection (Unsupervised Learning) in Machine Learning
Kuppusamy P
 
Machine Learning Performance metrics for classification
Machine Learning Performance metrics for classification
Kuppusamy P
 
Machine learning Introduction
Machine learning Introduction
Kuppusamy P
 
Reinforcement learning, Q-Learning
Reinforcement learning, Q-Learning
Kuppusamy P
 
Recurrent neural networks rnn
Recurrent neural networks rnn
Kuppusamy P
 
Image segmentation
Image segmentation
Kuppusamy P
 
Image enhancement
Image enhancement
Kuppusamy P
 
Feature detection and matching
Feature detection and matching
Kuppusamy P
 
Image processing, Noise, Noise Removal filters
Image processing, Noise, Noise Removal filters
Kuppusamy P
 
Flowchart design for algorithms
Flowchart design for algorithms
Kuppusamy P
 
Algorithm basics
Algorithm basics
Kuppusamy P
 
Problem solving using Programming
Problem solving using Programming
Kuppusamy P
 
Parts of Computer, Hardware and Software
Parts of Computer, Hardware and Software
Kuppusamy P
 
Java methods or Subroutines or Functions
Java methods or Subroutines or Functions
Kuppusamy P
 
Java iterative statements
Java iterative statements
Kuppusamy P
 
Java conditional statements
Java conditional statements
Kuppusamy P
 
Java introduction
Java introduction
Kuppusamy P
 
Logistic regression in Machine Learning
Logistic regression in Machine Learning
Kuppusamy P
 
Anomaly detection (Unsupervised Learning) in Machine Learning
Anomaly detection (Unsupervised Learning) in Machine Learning
Kuppusamy P
 
Machine Learning Performance metrics for classification
Machine Learning Performance metrics for classification
Kuppusamy P
 
Machine learning Introduction
Machine learning Introduction
Kuppusamy P
 
Reinforcement learning, Q-Learning
Reinforcement learning, Q-Learning
Kuppusamy P
 
Ad

Recently uploaded (20)

June 2025 Progress Update With Board Call_In process.pptx
June 2025 Progress Update With Board Call_In process.pptx
International Society of Service Innovation Professionals
 
Public Health For The 21st Century 1st Edition Judy Orme Jane Powell
Public Health For The 21st Century 1st Edition Judy Orme Jane Powell
trjnesjnqg7801
 
ENGLISH-5 Q1 Lesson 1.pptx - Story Elements
ENGLISH-5 Q1 Lesson 1.pptx - Story Elements
Mayvel Nadal
 
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
mprpgcwa2024
 
ENGLISH_Q1_W1 PowerPoint grade 3 quarter 1 week 1
ENGLISH_Q1_W1 PowerPoint grade 3 quarter 1 week 1
jutaydeonne
 
THE PSYCHOANALYTIC OF THE BLACK CAT BY EDGAR ALLAN POE (1).pdf
THE PSYCHOANALYTIC OF THE BLACK CAT BY EDGAR ALLAN POE (1).pdf
nabilahk908
 
How to use search fetch method in Odoo 18
How to use search fetch method in Odoo 18
Celine George
 
GREAT QUIZ EXCHANGE 2025 - GENERAL QUIZ.pptx
GREAT QUIZ EXCHANGE 2025 - GENERAL QUIZ.pptx
Ronisha Das
 
Values Education 10 Quarter 1 Module .pptx
Values Education 10 Quarter 1 Module .pptx
JBPafin
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 6-14-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 6-14-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
Romanticism in Love and Sacrifice An Analysis of Oscar Wilde’s The Nightingal...
Romanticism in Love and Sacrifice An Analysis of Oscar Wilde’s The Nightingal...
KaryanaTantri21
 
ECONOMICS, DISASTER MANAGEMENT, ROAD SAFETY - STUDY MATERIAL [10TH]
ECONOMICS, DISASTER MANAGEMENT, ROAD SAFETY - STUDY MATERIAL [10TH]
SHERAZ AHMAD LONE
 
Q1_TLE 8_Week 1- Day 1 tools and equipment
Q1_TLE 8_Week 1- Day 1 tools and equipment
clairenotado3
 
Pests of Maize: An comprehensive overview.pptx
Pests of Maize: An comprehensive overview.pptx
Arshad Shaikh
 
SCHIZOPHRENIA OTHER PSYCHOTIC DISORDER LIKE Persistent delusion/Capgras syndr...
SCHIZOPHRENIA OTHER PSYCHOTIC DISORDER LIKE Persistent delusion/Capgras syndr...
parmarjuli1412
 
IIT KGP Quiz Week 2024 Sports Quiz (Prelims + Finals)
IIT KGP Quiz Week 2024 Sports Quiz (Prelims + Finals)
IIT Kharagpur Quiz Club
 
Paper 106 | Ambition and Corruption: A Comparative Analysis of ‘The Great Gat...
Paper 106 | Ambition and Corruption: A Comparative Analysis of ‘The Great Gat...
Rajdeep Bavaliya
 
LDMMIA Shop & Student News Summer Solstice 25
LDMMIA Shop & Student News Summer Solstice 25
LDM & Mia eStudios
 
Aprendendo Arquitetura Framework Salesforce - Dia 02
Aprendendo Arquitetura Framework Salesforce - Dia 02
Mauricio Alexandre Silva
 
Gladiolous Cultivation practices by AKL.pdf
Gladiolous Cultivation practices by AKL.pdf
kushallamichhame
 
Public Health For The 21st Century 1st Edition Judy Orme Jane Powell
Public Health For The 21st Century 1st Edition Judy Orme Jane Powell
trjnesjnqg7801
 
ENGLISH-5 Q1 Lesson 1.pptx - Story Elements
ENGLISH-5 Q1 Lesson 1.pptx - Story Elements
Mayvel Nadal
 
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
mprpgcwa2024
 
ENGLISH_Q1_W1 PowerPoint grade 3 quarter 1 week 1
ENGLISH_Q1_W1 PowerPoint grade 3 quarter 1 week 1
jutaydeonne
 
THE PSYCHOANALYTIC OF THE BLACK CAT BY EDGAR ALLAN POE (1).pdf
THE PSYCHOANALYTIC OF THE BLACK CAT BY EDGAR ALLAN POE (1).pdf
nabilahk908
 
How to use search fetch method in Odoo 18
How to use search fetch method in Odoo 18
Celine George
 
GREAT QUIZ EXCHANGE 2025 - GENERAL QUIZ.pptx
GREAT QUIZ EXCHANGE 2025 - GENERAL QUIZ.pptx
Ronisha Das
 
Values Education 10 Quarter 1 Module .pptx
Values Education 10 Quarter 1 Module .pptx
JBPafin
 
Romanticism in Love and Sacrifice An Analysis of Oscar Wilde’s The Nightingal...
Romanticism in Love and Sacrifice An Analysis of Oscar Wilde’s The Nightingal...
KaryanaTantri21
 
ECONOMICS, DISASTER MANAGEMENT, ROAD SAFETY - STUDY MATERIAL [10TH]
ECONOMICS, DISASTER MANAGEMENT, ROAD SAFETY - STUDY MATERIAL [10TH]
SHERAZ AHMAD LONE
 
Q1_TLE 8_Week 1- Day 1 tools and equipment
Q1_TLE 8_Week 1- Day 1 tools and equipment
clairenotado3
 
Pests of Maize: An comprehensive overview.pptx
Pests of Maize: An comprehensive overview.pptx
Arshad Shaikh
 
SCHIZOPHRENIA OTHER PSYCHOTIC DISORDER LIKE Persistent delusion/Capgras syndr...
SCHIZOPHRENIA OTHER PSYCHOTIC DISORDER LIKE Persistent delusion/Capgras syndr...
parmarjuli1412
 
IIT KGP Quiz Week 2024 Sports Quiz (Prelims + Finals)
IIT KGP Quiz Week 2024 Sports Quiz (Prelims + Finals)
IIT Kharagpur Quiz Club
 
Paper 106 | Ambition and Corruption: A Comparative Analysis of ‘The Great Gat...
Paper 106 | Ambition and Corruption: A Comparative Analysis of ‘The Great Gat...
Rajdeep Bavaliya
 
LDMMIA Shop & Student News Summer Solstice 25
LDMMIA Shop & Student News Summer Solstice 25
LDM & Mia eStudios
 
Aprendendo Arquitetura Framework Salesforce - Dia 02
Aprendendo Arquitetura Framework Salesforce - Dia 02
Mauricio Alexandre Silva
 
Gladiolous Cultivation practices by AKL.pdf
Gladiolous Cultivation practices by AKL.pdf
kushallamichhame
 

Java arrays

  • 2. Access Specifiers / modifier in Java • Defines an access scope of the variable, methods and classes. • Can change the access level of fields, constructors, methods, and class by applying the access modifier on it. 1. Public: Accessible from any other class, methods or interface. 2. Private: Accessible within the class or method where it is defined. 3. Protected: Accessible in the same class or its child class or in all those classes which are defined in the same package. 4. Default: When none of the access specifiers is specified. Can be accessed by all classes which are defined in same package only. Dr. Kuppusamy P
  • 3. Access Specifiers / modifier in Java Dr. Kuppusamy P Access Modifier within class within package outside package by subclass only outside package Private Y N N N Default Y Y N N Protected Y Y Y N Public Y Y Y Y
  • 4. Arrays • Array is a container object that contains a finite number of values of a similar data type . • When an array is created • The length (size) of an array is fixed • Array elements are automatically initialized with the default value of their data type • Two types • One dimensional Array • Multi-dimensional Array • 2D Array, 3D Array Dr. Kuppusamy P
  • 5. One Dimensional Array • Syntax: • data-type[] variable = new data-type[array_length] • Eg. int[] a = new int[6]; //define integer array with size 6 Dr. Kuppusamy P
  • 6. Create and Initialize Array • Create and initialize array as below o int[] x = {10, 20, 30}; o int[] x = new int[] {10, 20, 30}; • Here the length of an array is determined by the number of values provided between { and }. • The built-in length property determines the size of any array • E.g. o int[] x = new int[10]; oint x_len = x.length; Dr. Kuppusamy P
  • 7. Example - Array public class ArrayEx { public static void main(String[] args) { int[] marks; // declares an array of integers marks = new int[5]; // allocates memory for 5integers marks[0] = 11; marks[4] = 22; System.out.println("Element at index 0: " + marks[0]); System.out.println("Element at index 1: " + marks[1]); System.out.println("Element at index 4: " + marks[4]); } } Dr. Kuppusamy P
  • 8. Array bounds and Array Resizing • Array index (subscripts) begins with 0 • Can't access an array element beyond the defined range. • Can't resize an array. • Can use the same reference variable to refer new array. • int x[] = new int[5]; • x= new int[10]; Dr. Kuppusamy P
  • 9. Copying Array • To copy array elements from one array to another array, use arraycopy static method from System class. Syntax: public static void arraycopy(Object s, int sIndex, Object d, int dIndex, int length) Ex: int source[] = {1, 2, 3, 4, 5, 6}; int dest[] = new int[10]; System.arraycopy(source, 0, dest, 0, source.length); Dr. Kuppusamy P
  • 10. Two-Dimensional Array • Two-dimensional array is a collection of 1-Dimensional arrays. • Initializing two-dimensional arrays: int[][] y = new int[2][4]; • The 1st dimension represent rows or number of one dimension • The 2nd dimension represent columns or number of elements in the each one dimensions Jagged Array: • Column representation is optional in two dimensional arrays. int[][] y = new int[3][] • The curly braces { } may also be used to initialize two dimensional arrays. Eg: int[][] y = { {1,2,3}, {4,5,6}, {7,8,9} }; int[][] y = new int[3][] Dr. Kuppusamy P
  • 11. Two-Dimensional Array • Array can be initialized with the row dimension and without initializing the columns, but not vice versa • int[][] x = new int[3][]; • int[][] x = new int[][3]; //error • The length of the columns can vary for each row and initialize number of columns in each row Ex1: • int [][] numbers = new int [3][]; • numbers[0] = new int[] {6,9,3,7}; //row1 • numbers[1] = new int [] {5,2} // row2 • numbers[2] = new int [] {8,4,1}; // row3 Dr. Kuppusamy P
  • 12. Example: 2D-Array public class TwoD { public static void main(String[] args) { int [][] x = new int[3][]; // initialize number of rows x[0] = new int[3]; // define number of columns in each row x[1] = new int[2]; x[2] = new int[5]; for(int i=0; i < x.length; i++) // print array elements { for (int j=0; j < x[i].length; j++) { x[i][j] = i; System.out.print(x[i][j]+ ” “); } System.out.println(); } } } Dr. Kuppusamy P
  • 13. References Dr. Kuppusamy P Herbert Schildt, “Java: The Complete Reference”, McGraw-Hill Education, Tenth edition, 2017.