Arrays - Vocabulary

Description

AP Computer Science (Arrays) Flashcards on Arrays - Vocabulary, created by vgeetha on 27/08/2013.
vgeetha
Flashcards by vgeetha, updated more than 1 year ago
vgeetha
Created by vgeetha over 10 years ago
71
1

Resource summary

Question Answer
What are arrays? Arrays are data structure to store the data of the same data type
element of an array individual units of an array
array index index number starting from 0 in which order the array elements are arranged consecutively in the memory location
name of the array a reference variable to store the location where the first element of the array is stored.
for(int i=0; i<arrayname.length; i++) { ------ } for next loop or enhanced for loop
for(String s: name) { ---- } for each loop
for each loop used to retrieve elements without accessing to individual elements
for next loop for arrays used when you need to access a particular element through its index
arrayName.length gives the total number of elements in an array named arrayName.
array can store the primitive data types objects
an array can store only the same data type that means all the elements of an array should be of the same type
arrayName[5] refers to the 6th element of the array
apart from primitive data types arrays can also store objects
Show full summary Hide full summary

Similar

Arrays
vgeetha
Computer science unit 2
Somto Ibeme
JavaScript Fundamentals
Andrew Watters
Missed Questions on Inheritance/Polymorphism Test
Nik Nguyen
AP CS A
KonSpiral
Abstract Classes & Interfaces & Polymorphism
Nik Nguyen
Inheritance
Nik Nguyen
Two-Dimensional Arrays
José Miguel Gallardo
Arrays
Tony Meman
Prova
Vincio