Untitled
unknown
abc
3 years ago
559 B
3
Indexable
public class Main { public static void main(String[] args) { int[] a = { 10, 20, 30, 40, 50 }; // هنا قمنا بتعريف مصفوفة تتألف من 5 عناصر a[0] = 99; // هنا قمنا بتغيير قيمة العنصر الأول System.out.println("a[0] = " + a[0]); // هنا عرضنا قيمة العنصر الأول System.out.println("a.length = " + a.length); // هنا عرضنا عدد عناصر المصفوفة } }
Editor is loading...