SlideShare a Scribd company logo
Java Array <br />Array, what is it? An array is a group of variables of the same data type and referred to by a common name. An array is contiguous block of memory locations referred by a common name.<br />Why array is needed?<br />You might come across a situation where you need to store similar type of values for a large number of data items. For example : to store all student mark , you need declare thousands of variables <br /> In addition, each variable name needs to be unique. To avoid such situations, you can use arrays do store the thousands of student mark<br />For example Java Array<br />To store the marks of 5000 students, you can declare an array, marks, of size 5000 and can store the marks of as many students.<br />int marks[] = new int[5000];<br />

More Related Content

PPTX
Introduction to arrays
PPTX
Types of Arrays
PPTX
Mod 12
PDF
Algorithm and Data Structure - Array and Struct
PPTX
Arrays in c
PDF
Arrays in java
PPTX
Chapter 6 java
PPTX
PPt. on An _Array in C
Introduction to arrays
Types of Arrays
Mod 12
Algorithm and Data Structure - Array and Struct
Arrays in c
Arrays in java
Chapter 6 java
PPt. on An _Array in C

What's hot (14)

PPTX
Array in c
PPTX
2. array and numerical arrays
PDF
PHP Basic & Arrays
PDF
Arrays In C
PPTX
Arrays In C Language
PPTX
Array c programming
PPT
Array1
PPTX
Array in c
PDF
Arrays in C++
PPTX
Array in c
PPTX
PPTX
Array in c
2. array and numerical arrays
PHP Basic & Arrays
Arrays In C
Arrays In C Language
Array c programming
Array1
Array in c
Arrays in C++
Array in c
Ad

Recently uploaded (20)

PDF
01-Introduction-to-Information-Management.pdf
PPTX
Cell Structure & Organelles in detailed.
PDF
Classroom Observation Tools for Teachers
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
Insiders guide to clinical Medicine.pdf
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
VCE English Exam - Section C Student Revision Booklet
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
GDM (1) (1).pptx small presentation for students
PDF
Basic Mud Logging Guide for educational purpose
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
01-Introduction-to-Information-Management.pdf
Cell Structure & Organelles in detailed.
Classroom Observation Tools for Teachers
Microbial disease of the cardiovascular and lymphatic systems
Insiders guide to clinical Medicine.pdf
STATICS OF THE RIGID BODIES Hibbelers.pdf
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
VCE English Exam - Section C Student Revision Booklet
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Microbial diseases, their pathogenesis and prophylaxis
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PPH.pptx obstetrics and gynecology in nursing
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
2.FourierTransform-ShortQuestionswithAnswers.pdf
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
GDM (1) (1).pptx small presentation for students
Basic Mud Logging Guide for educational purpose
TR - Agricultural Crops Production NC III.pdf
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Ad

Java array

  • 1. Java Array <br />Array, what is it? An array is a group of variables of the same data type and referred to by a common name. An array is contiguous block of memory locations referred by a common name.<br />Why array is needed?<br />You might come across a situation where you need to store similar type of values for a large number of data items. For example : to store all student mark , you need declare thousands of variables <br /> In addition, each variable name needs to be unique. To avoid such situations, you can use arrays do store the thousands of student mark<br />For example Java Array<br />To store the marks of 5000 students, you can declare an array, marks, of size 5000 and can store the marks of as many students.<br />int marks[] = new int[5000];<br />