


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Arrays are data structures that store a collection of elements of the same type, arranged in contiguous memory locations. They offer indexed access to their elements, allowing for efficient storage and retrieval of data. Arrays have a fixed size determined at the time of declaration and can hold elements such as integers, characters, or objects. Here is Array implementation in Java
Typology: Lecture notes
1 / 4
This page cannot be seen from the preview
Don't miss anything!



Two-Dimensional ARRAY:
class test { public static void main(String args[]) { int A[]={2,4,6,8,10} for(int i=0;i<A.length;i++) { System.out.println(A[i]); } for(int i=A.length-1;i>=0;i--) { System.out.println(A[i]); } } }
class test: { public static void main(String args[]) { int A[]; for(int x[]:A) { for(int y:x) { System.out.println(y); } System.out.println(“\n”); } } }