Arrays - Vocabulary

Beschreibung

AP Computer Science (Arrays) Karteikarten am Arrays - Vocabulary, erstellt von vgeetha am 27/08/2013.
vgeetha
Karteikarten von vgeetha, aktualisiert more than 1 year ago
vgeetha
Erstellt von vgeetha vor mehr als 10 Jahre
71
1

Zusammenfassung der Ressource

Frage Antworten
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
Zusammenfassung anzeigen Zusammenfassung ausblenden

ähnlicher Inhalt

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