JavaJava · Chapterبەش 9 · Lectureوانە 9.2

ArrayList and Wrapper ClassesArrayList و کلاسە پێچەرەوەکان

A list that grows: ArrayList<E> with add, get, set, remove, size and clear, loops (and removing safely inside them), IndexOutOfBoundsException and ConcurrentModificationException, wrapper classes such as Integer with autoboxing and unboxing, parseInt, the remove(int) versus remove(Object) trap, Collections.sort, the List interface, and when to choose an array or an ArrayList.

کە گەورە دەبێت: ⁦ArrayList<E>⁩ بە add، get، set، remove، size و clear، (و لابردنی سەلامەت لە ناویاندا)، IndexOutOfBoundsException و ConcurrentModificationException، وەک Integer بە و کردنەوە، parseInt، تەڵەی ⁦remove(int)⁩ بەرامبەر ⁦remove(Object)⁩، ⁦Collections.sort⁩، List و کەی یان ArrayList هەڵبژێریت.

15 min read14 خولەک خوێندنەوە · 19 stepsهەنگاو

What you will learnچی فێر دەبیت

  • Create an ArrayList and use add, get, set, remove, size, contains and clear.
  • Loop over a list and remove elements without skipping any or stopping the program.
  • Explain wrapper classes, autoboxing and unboxing, and their traps with null and ==.
  • Convert text to numbers with parseInt and tell remove(int) from remove(Object).
  • Sort lists with Collections.sort, declare them with List, and choose between an array and an ArrayList.
  • ArrayListـێک دروست بکەیت و add، get، set، remove، size، contains و clear بەکار بهێنیت.
  • بەسەر بسووڕێیتەوە و لاببەیت بەبێ بازدان بەسەر هیچیاندا یان وەستاندنی .
  • ، و کردنەوە و تەڵەکانیان لەگەڵ null و == ڕوون بکەیتەوە.
  • بە parseInt دەق بکەیت بە ژمارە و ⁦remove(int)⁩ لە ⁦remove(Object)⁩ جیا بکەیتەوە.
  • بە ⁦Collections.sort⁩ ڕیز بکەیت، بە List بیانناسێنیت و لە نێوان و ArrayListـدا هەڵبژێریت.

An array cannot grow; an ArrayList canڕیزەک گەورە نابێت؛ ArrayList دەبێت

An array's length is fixed when it is made (new and default values). A class of three students gets a fourth one, and the array has no place for her:

درێژیی لە کاتی دروستکردنیدا جێگیر دەبێت (new و نرخە بنەڕەتییەکان). پۆلێکی سێ قوتابی قوتابییەکی چوارەمی بۆ دێت و هیچ شوێنێکی بۆی نییە:

FullArray.javaJAVAType in a terminalلە تێرمیناڵدا بینووسە
public class FullArray {
    public static void main(String[] args) {
        String[] names = new String[3];
        names[0] = "Aram";
        names[1] = "Shilan";
        names[2] = "Karwan";
        names[3] = "Dilan";               // a fourth student arrives
    }
}
Two panels. Left: String[] names = new String[3]; holds Aram, Shilan and Karwan; names[3] = "Dilan"; tries a fourth place that does not exist: Index 3 out of bounds for length 3; the length is fixed when it is made. Right: names.add("Dilan"); on an ArrayList adds a fourth place with Dilan, and size() is now 4: a new place is made when needed. Note: ArrayList (java.util) keeps an array inside and makes a bigger one by itself.دوو بەش. چەپ: String[] names = new String[3]; Aram، Shilan و Karwan هەڵدەگرێت؛ names[3] = "Dilan"; هەوڵی شوێنی چوارەم دەدات کە بوونی نییە: Index 3 out of bounds for length 3؛ درێژییەکەی لە کاتی دروستکردندا جێگیر دەبێت. ڕاست: names.add("Dilan"); لەسەر ArrayListـێک شوێنێکی چوارەم بە Dilanـەوە زیاد دەکات و ئێستا size() دەکاتە 4: کاتی پێویست شوێنێکی نوێ دروست دەکرێت. تێبینی: ArrayList (java.util) ڕیزەکێک لە ناوەوە هەڵدەگرێت و خۆی یەکێکی گەورەتر دروست دەکات.
A fixed shelf and a shelf that growsڕەفەیەکی جێگیر و ڕەفەیەک کە گەورە دەبێتCêIT

An ArrayList is a that grows and shrinks as you add and remove elements. Inside it keeps an array; when the array is full it copies everything into a bigger one, the job you did by hand with Arrays.copyOf.

ArrayList کە لە کاتی زیادکردن و لابردنی گەورە و بچووک دەبێت. لە ناوەوە هەڵدەگرێت؛ کاتێک پڕ دەبێت هەموو شتێک کۆپی دەکات بۆ یەکێکی گەورەتر، ئەو کارەی خۆت بە ⁦Arrays.copyOf⁩ دەتکرد.

Creating an ArrayList: add, get, sizeدروستکردنی ⁦ArrayList: add⁩، get، size

ArrayList is in java.util (import). In angle brackets you say what the list holds: ArrayList<String> is a list of strings. add appends at the end, get(i) reads index i, size() counts the elements, and println prints the whole list:

ArrayList لە java.utilـدایە (import). لە ناو کەوانەی ⁦< >⁩ـدا دەڵێیت چی هەڵدەگرێت: ArrayList<String> لە . add لە کۆتاییدا زیاد دەکات، get(i) i دەخوێنێتەوە، size() دەژمێرێت و println هەموو چاپ دەکات:

FirstList.javaJAVAType in a terminalلە تێرمیناڵدا بینووسە
import java.util.ArrayList;

public class FirstList {
    public static void main(String[] args) {
        ArrayList<String> names = new ArrayList<>();
        names.add("Aram");
        names.add("Shilan");
        names.add("Karwan");
        System.out.println(names);
        System.out.println("Size: " + names.size());
        System.out.println("First: " + names.get(0));
        names.add("Dilan");               // the list simply grows
        System.out.println(names + " size " + names.size());
    }
}
The line import java.util.ArrayList; above ArrayList<String> names = new ArrayList<>(); split into parts: ArrayList, the class; <String>, the element type, a class and never int; names, the variable; new ArrayList<>(), a new empty list, where <> means the same type. Note: read it as: names is an ArrayList of Strings.دێڕی import java.util.ArrayList; لە سەرووی ArrayList<String> names = new ArrayList<>();ـەوە کە بەسەر بەشەکاندا دابەش کراوە: ArrayList، کلاسەکە؛ <String>، جۆری دانەکان، کلاسێک و هەرگیز int؛ names، گۆڕاوەکە؛ new ArrayList<>()، لیستێکی نوێی بەتاڵ، کە <> واتە هەمان جۆر. تێبینی: وا بیخوێنەوە: names ArrayListـێکە لە Stringـەکان.
ArrayList<String>: a list whose elements are Strings⁦ArrayList<String>⁩: کە StringـنCêIT

The type in angle brackets makes ArrayList a : one class that works for any element type. After new ArrayList the empty <> (the diamond) tells javac to use the same type again. Unlike an array, the list prints its elements directly: [Aram, Shilan, Karwan].

جۆرەکەی ناو کەوانەی ⁦< >⁩ ArrayList دەکاتە : یەک کە بۆ هەر جۆرێکی کار دەکات. لە دوای new ArrayList، <>ـی بەتاڵ (diamond) بە javac دەڵێت هەمان جۆر دووپاتە بەکار بهێنە. بە پێچەوانەی ، ڕاستەوخۆ چاپ دەکات: [Aram, Shilan, Karwan].

Adding, inserting and findingزیادکردن، خستنە ناوەوە و دۆزینەوە

add(element) appends; add(index, element) inserts at a position and moves the rest one place right. contains asks whether an element is in the list, and indexOf gives its index, or -1 when it is missing:

add(element) لە کۆتاییدا زیاد دەکات؛ add(index, element) لە شوێنێکدا دەیخاتە ناوەوە و ئەوانی تر شوێنێک بۆ ڕاست دەجووڵێنێت. contains دەپرسێت ئایا لە و indexOf دەدات، یان -1 کاتێک نییە:

AddAt.javaJAVAType in a terminalلە تێرمیناڵدا بینووسە
import java.util.ArrayList;

public class AddAt {
    public static void main(String[] args) {
        ArrayList<String> queue = new ArrayList<>();
        queue.add("Aram");
        queue.add("Shilan");
        queue.add("Karwan");
        queue.add(1, "Hana");             // Hana goes in at index 1; the others move right
        System.out.println(queue);
        System.out.println("Is Karwan here? " + queue.contains("Karwan"));
        System.out.println("Where is Karwan? " + queue.indexOf("Karwan"));
        System.out.println("Where is Soran? " + queue.indexOf("Soran"));
    }
}
An animation. An empty ArrayList with size() 0; add("Aram"), add("Shilan") and add("Karwan") append one box each and size() grows to 3. add(1, "Hana") inserts Hana at index 1 while Shilan and Karwan move one place right (size 4). remove(0) takes Aram out and the rest move one place left (size 3). get(1) reads index 1: Shilan.
An animation. An empty ArrayList with size() 0; add("Aram"), add("Shilan") and add("Karwan") append one box each and size() grows to 3. add(1, "Hana") inserts Hana at index 1 while Shilan and Karwan move one place right (size 4). remove(0) takes Aram out and the rest move one place left (size 3). get(1) reads index 1: Shilan.
add appends or inserts; remove closes the gap; size() followsadd زیاد دەکات یان دەیخاتە ناوەوە؛ remove شوێنە چۆڵەکە دادەخات؛ ⁦size()⁩ دوای دەکەوێتCêIT

Adding, inserting and findingزیادکردن، خستنە ناوەوە و دۆزینەوە

Outside the list: IndexOutOfBoundsExceptionدەرەوەی لیستەکە: IndexOutOfBoundsException

A list has the indexes 0 to size() - 1. get with any other index throws an IndexOutOfBoundsException. The message is like the array's; the stack trace also lists the methods inside ArrayList that checked the index, and the last line points to your code (Reading a stack trace):

0 تا size() - 1ـی هەیە. get بە هەر تر IndexOutOfBoundsException فڕێ دەدات. پەیامەکە وەک هی وایە؛ ئەو ناو ArrayList ڕیز دەکات کە پشکنی و دوایین دێڕ ئاماژە بە کۆدی خۆت دەکات (خوێندنەوەی ڕێچکەیەکی هەڵە):

BadGet.javaJAVAType in a terminalلە تێرمیناڵدا بینووسە
import java.util.ArrayList;

public class BadGet {
    public static void main(String[] args) {
        ArrayList<String> names = new ArrayList<>();
        names.add("Aram");
        names.add("Shilan");
        names.add("Karwan");
        System.out.println(names.get(3));
    }
}
The list Aram, Shilan, Karwan with the indexes 0, 1 and 2, and a dashed, crossed-out place with index 3. Lines: names.size() -> 3; names.get(names.size() - 1) -> "Karwan"; names.get(3): IndexOutOfBoundsException: Index 3 out of bounds for length 3. Note: the last element is get(size() - 1).لیستی Aram، Shilan، Karwan بە ئیندێکسەکانی 0، 1 و 2 و شوێنێکی پچڕپچڕی خەتلێدراو بە ئیندێکسی 3. دێڕەکان: names.size() -> 3؛ names.get(names.size() - 1) -> "Karwan"؛ names.get(3): IndexOutOfBoundsException: Index 3 out of bounds for length 3. تێبینی: دوایین دانە get(size() - 1)ـە.
Valid indexes: 0 to size() - 1 دروست: 0 تا ⁦size() - 1⁩CêIT

set, remove, clearset، remove، clear

set(index, element) replaces one element and returns the old one. remove(index) takes an element out and closes the gap (an array cannot do that: it needs a new, shorter array); remove(element) removes the first equal element and returns true if it found one. clear() empties the list, and isEmpty() asks whether it is empty:

set(index, element) یەک دەگۆڕێتەوە و کۆنەکە دەگەڕێنێتەوە. remove(index) دەردەهێنێت و شوێنە چۆڵەکە دادەخات ( ناتوانێت ئەمە بکات: پێویستی بە ڕیزەکێکی نوێی کورتتر هەیە)؛ remove(element) یەکەم یەکسان لادەبات و ئەگەر دۆزییەوە true دەگەڕێنێتەوە. clear() بەتاڵ دەکاتەوە و isEmpty() دەپرسێت ئایا بەتاڵە:

ChangeList.javaJAVAType in a terminalلە تێرمیناڵدا بینووسە
import java.util.ArrayList;

public class ChangeList {
    public static void main(String[] args) {
        ArrayList<String> names = new ArrayList<>();
        names.add("Aram");
        names.add("Shilan");
        names.add("Karwan");
        names.add("Dilan");
        String old = names.set(0, "Hana");     // replace, and get the old element back
        System.out.println(old + " was replaced: " + names);
        names.remove(1);                       // remove by index: Shilan
        System.out.println(names);
        boolean found = names.remove("Dilan"); // remove by value
        System.out.println(found + " " + names + " size " + names.size());
        names.clear();
        System.out.println(names + " empty? " + names.isEmpty());
    }
}
Before: Aram, Shilan, Karwan. set(1, "Hana") gives Aram, Hana, Karwan: replaced, size 3, returns "Shilan". add(1, "Hana") gives Aram, Hana, Shilan, Karwan: inserted, size 4. remove(1) gives Aram, Karwan: removed, size 2.پێشتر: Aram، Shilan، Karwan. set(1, "Hana") دەدات Aram، Hana، Karwan: گۆڕدرایەوە، size 3، "Shilan" دەگەڕێنێتەوە. add(1, "Hana") دەدات Aram، Hana، Shilan، Karwan: خرایە ناوەوە، size 4. remove(1) دەدات Aram، Karwan: لابرا، size 2.
set keeps the size; add(index) adds one; remove takes one awayset قەبارە دەپارێزێت؛ ⁦add(index)⁩ یەکێک زیاد دەکات؛ remove یەکێک کەم دەکاتCêIT

Looping over a listسووڕانەوە بەسەر لیستێکدا

Both loops of arrays work. A counting for uses size() and get(i), handy when you need the position; the gives each element in turn (for-each):

هەردوو کار دەکەن. forـی ژماردن size() و get(i) بەکار دەهێنێت، کە بە کەڵکە کاتێک پێویستت بە شوێن هەیە؛ هەر بە نۆرە دەدات (خولی foreach):

LoopList.javaJAVAType in a terminalلە تێرمیناڵدا بینووسە
import java.util.ArrayList;

public class LoopList {
    public static void main(String[] args) {
        ArrayList<String> names = new ArrayList<>();
        names.add("Aram");
        names.add("Shilan");
        names.add("Karwan");
        for (int i = 0; i < names.size(); i++) {
            System.out.println((i + 1) + ". " + names.get(i));
        }
        for (String name : names) {
            System.out.println("Hello, " + name);
        }
    }
}

For an array the loop condition is i < a.length, for a list i < list.size(): arrays have a length field, lists a size() method. Mixing them up is one of the common mistakes at the end of this lesson.

بۆ i < a.lengthـە و بۆ i < list.size(): خانەی lengthیان هەیە و size(). تێکەڵکردنیان یەکێکە لە هەڵە باوەکانی کۆتایی ئەم وانەیە.

Looping over a listسووڕانەوە بەسەر لیستێکدا

Removing elements inside a loopلابردنی دانەکان لە ناو خولێکدا

Removing while a for-each loop is running stops the program: the loop notices that the list changed under it and throws a ConcurrentModificationException:

لابردن لە کاتی کارکردنی دەوەستێنێت: هەست دەکات کە لە ژێریدا گۆڕاوە و ConcurrentModificationException فڕێ دەدات:

RemoveInLoop.javaJAVAType in a terminalلە تێرمیناڵدا بینووسە
import java.util.ArrayList;

public class RemoveInLoop {
    public static void main(String[] args) {
        ArrayList<String> names = new ArrayList<>();
        names.add("Aram");
        names.add("Karwan");
        names.add("Shilan");
        names.add("Dilan");
        for (String name : names) {
            if (name.startsWith("K")) {
                names.remove(name);
            }
        }
        System.out.println(names);
    }
}
Removing every mark below 50 from 90, 45, 30, 75. Left, counting forwards: at i = 1, 45 is removed, 30 slides into index 1, and the loop goes on with i = 2, so 30 is skipped and the result is 90, 30, 75. Right, counting backwards from size() - 1: 30 and then 45 are removed, nothing still to visit moves, and the result is 90, 75. Note: in a for-each loop, list.remove(…) stops the program with ConcurrentModificationException.لابردنی هەموو نمرەیەکی خوار 50 لە 90، 45، 30، 75. چەپ، ژماردن بەرەو پێش: لە i = 1ـدا 45 لادەبرێت، 30 دێتە ئیندێکسی 1 و خولەکە بە i = 2 بەردەوام دەبێت، بۆیە بازی بەسەر 30دا دەدرێت و ئەنجام 90، 30، 75ـە. ڕاست، ژماردن بە پاشەوە لە size() - 1ـەوە: سەرەتا 30 و پاشان 45 لادەبرێن، هیچ شتێکی سەردان نەکراو ناجووڵێت و ئەنجام 90، 75ـە. تێبینی: لە خولی foreachـدا، list.remove(…) بەرنامەکە بە ConcurrentModificationException دەوەستێنێت.
Remove from the end, so the elements still to visit stay in placeلە کۆتاییەوە لاببە، تا ئەوانەی ماون جێی خۆیان بپارێزنCêIT

A counting loop forwards does not crash, but it skips the element that slides into the gap (real result: [90, 30, 75]). Count backwards instead:

ژماردن بەرەو پێش تێک ناشکێت، بەڵام بازی بەسەر ئەو دەدات کە دێتە ناو شوێنە چۆڵەکە (ئەنجامی ڕاستەقینە: [90, 30, 75]). لە جیاتی ئەوە بە پاشەوە بژمێرە:

RemoveBackwards.javaJAVAType in a terminalلە تێرمیناڵدا بینووسە
import java.util.ArrayList;

public class RemoveBackwards {
    public static void main(String[] args) {
        ArrayList<Integer> marks = new ArrayList<>();
        marks.add(90);
        marks.add(45);
        marks.add(30);
        marks.add(75);
        for (int i = marks.size() - 1; i >= 0; i--) {    // from the end to the start
            if (marks.get(i) < 50) {
                marks.remove(i);
            }
        }
        System.out.println(marks);
    }
}

Numbers in a list: wrapper classesژمارە لە لیستێکدا: کلاسە پێچەرەوەکان

A list holds only objects, so ArrayList<int> is refused: the type argument must be a reference type, not a (The eight primitive types):

تەنیا هەڵدەگرێت، بۆیە ArrayList<int> ڕەت دەکرێتەوە: جۆری ناو کەوانەکە دەبێت بێت، نەک (هەشت جۆرە سەرەتاییەکە):

IntList.javaJAVAType in a terminalلە تێرمیناڵدا بینووسە
import java.util.ArrayList;

public class IntList {
    public static void main(String[] args) {
        ArrayList<int> marks = new ArrayList<>();
        marks.add(90);
    }
}
Left: int mark = 90; a plain value 90 in a small box. An arrow to the right: Integer box = 90; an object, drawn as a gift box, that holds one int, 90. Below, the eight pairs: byte and Byte, short and Short, int and Integer, long and Long, float and Float, double and Double, char and Character, boolean and Boolean. Note: primitive types start with a small letter, their wrapper classes with a capital.چەپ: int mark = 90; نرخێکی سادەی 90 لە سندووقێکی بچووکدا. تیرێک بۆ ڕاست: Integer box = 90; ئۆبجێکتێک کە وەک دیارییەکی پێچراو کێشراوە و یەک int هەڵدەگرێت، 90. لە خوارەوە هەشت جووتەکە: byte و Byte، short و Short، int و Integer، long و Long، float و Float، double و Double، char و Character، boolean و Boolean. تێبینی: جۆرە سەرەتاییەکان بە پیتی بچووک و کلاسە پێچەرەوەکانیان بە پیتی گەورە دەست پێ دەکەن.
Every primitive type has a wrapper classهەموو هەیەCêIT

For each primitive type Java has a in java.lang: an object that holds one value. Write ArrayList<Integer>, ArrayList<Double>, ArrayList<Character> or ArrayList<Boolean>. Note the two irregular names, Integer and Character. A list can also hold objects of your own classes (Many objects in an ArrayList).

Java بۆ هەر لە java.langـدا هەیە: کە یەک هەڵدەگرێت. بنووسە ArrayList<Integer>، ArrayList<Double>، ArrayList<Character> یان ArrayList<Boolean>. سەرنجی دوو ناوە ناڕێکەکە بدە: Integer و Character. دەتوانێت خۆشت هەڵبگرێت (چەندین ئۆبجێکت لە لیستێکدا).

Numbers in a list: wrapper classesژمارە لە لیستێکدا: کلاسە پێچەرەوەکان

Autoboxing and unboxingپێچانەوەی خۆکار و کردنەوە

You never wrap numbers by hand. marks.add(90) turns the int 90 into an Integer object by itself: . Reading it back as an int unwraps it again (unboxing), so you can calculate with the elements as usual:

هەرگیز ژمارە بە دەست ناپێچیتەوە. marks.add(90) خۆی intـی ⁦90⁩ دەکات بە Integer: . خوێندنەوەی وەک int دووپاتە دەیکاتەوە (unboxing)، بۆیە دەتوانیت وەک هەمیشە بە ژمێرکاری بکەیت:

IntegerList.javaJAVAType in a terminalلە تێرمیناڵدا بینووسە
import java.util.ArrayList;

public class IntegerList {
    public static void main(String[] args) {
        ArrayList<Integer> marks = new ArrayList<>();
        marks.add(90);                    // the int 90 is boxed into an Integer
        marks.add(75);
        marks.add(88);
        int sum = 0;
        for (int mark : marks) {          // each Integer is unboxed into an int
            sum += mark;
        }
        System.out.println(marks + " sum " + sum + " average " + (double) sum / marks.size());
        int first = marks.get(0);         // unboxing again
        System.out.println(first + 10);
    }
}
marks.add(90); an int 90 moves along an arrow marked boxing into an ArrayList<Integer> whose elements 90, 75 and 88 are drawn as wrapped Integer objects. Below, int first = marks.get(0); an arrow marked unboxing brings a plain 90 back out. Note: a null Integer cannot be unboxed: NullPointerException.marks.add(90); int 90 بە تیرێکی نیشانکراو بە پێچانەوە دەچێتە ناو ArrayList<Integer>ـێک کە دانەکانی 90، 75 و 88 وەک ئۆبجێکتی پێچراوی Integer کێشراون. لە خوارەوە، int first = marks.get(0); تیرێکی نیشانکراو بە کردنەوە 90ـێکی سادە دەردەهێنێتەوە. تێبینی: Integerـێکی null ناکرێتەوە: NullPointerException.
add wraps the int; get unwraps itadd int دەپێچێتەوە؛ get دەیکاتەوەCêIT

Numbers in a list: wrapper classesژمارە لە لیستێکدا: کلاسە پێچەرەوەکان

Wrapper traps: null and ==تەڵەکانی کلاسە پێچەرەوەکان: null و ==

A wrapper variable can be null, and an unfilled Integer[] is full of null (An empty slot). Unboxing null stops the program:

پێچەرەوە دەتوانێت null بێت و Integer[]ـێکی پڕنەکراوە پڕە لە null (شوێنی چۆڵ). کردنەوەی null دەوەستێنێت:

UnboxNull.javaJAVAType in a terminalلە تێرمیناڵدا بینووسە
public class UnboxNull {
    public static void main(String[] args) {
        Integer[] counts = new Integer[3];        // three empty places: null, null, null
        System.out.println(counts[0]);
        int total = counts[0] + 1;               // unboxing null
        System.out.println(total);
    }
}

Wrappers are objects, so compare their values with equals (or as int), not with ==, which asks whether two variables refer to the same object, as with strings (Comparing strings).

پێچەرەوەکان ، بۆیە بە equals بەراورد بکە (یان وەک int)، نەک بە ==، کە دەپرسێت ئایا دوو ئاماژە بە هەمان دەکەن، وەک (بەراوردکردنی زنجیرەنووسەکان).

Useful wrapper methods: parseInt and friendsمیتۆدەکانی بەسوودی پێچەرەوەکان: parseInt و هاوڕێکانی

The wrapper classes also hold static helper methods. Integer.parseInt turns text into an int and Double.parseDouble into a double (, not a cast: Type casting); MAX_VALUE and MIN_VALUE give the range, and Character can test single characters:

یارمەتیدەریشیان هەیە. Integer.parseInt دەق دەکات بە int و Double.parseDouble بە double (، نەک کاست: کاستکردن)؛ MAX_VALUE و MIN_VALUE گەورەترین و بچووکترین ژمارەی ئەو جۆرە دەدەن و Character دەتوانێت یەک بە یەک تاقی بکاتەوە:

Wrappers.javaJAVAType in a terminalلە تێرمیناڵدا بینووسە
public class Wrappers {
    public static void main(String[] args) {
        int age = Integer.parseInt("21");           // text -> int
        double price = Double.parseDouble("2.5");   // text -> double
        System.out.println(age + 1);
        System.out.println(price * 2);
        System.out.println(Integer.MAX_VALUE + " " + Integer.MIN_VALUE);
        System.out.println(Character.isDigit('7') + " " + Character.isLetter('7'));
        System.out.println(Character.toUpperCase('k'));
        System.out.println(Boolean.parseBoolean("true"));
        String text = Integer.toString(250);        // int -> text
        System.out.println(text.length());
    }
}
Four rows. "21" (String) through Integer.parseInt gives 21 (int); "2.5" through Double.parseDouble gives 2.5 (double); "twenty" through Integer.parseInt gives NumberFormatException; 250 (int) through Integer.toString gives "250" (String). Note: use it for numbers that arrive as text, from args, a file or a text field.چوار ڕیز. "21" (String) بە Integer.parseInt دەبێتە 21 (int)؛ "2.5" بە Double.parseDouble دەبێتە 2.5 (double)؛ "twenty" بە Integer.parseInt دەبێتە NumberFormatException؛ 250 (int) بە Integer.toString دەبێتە "250" (String). تێبینی: بۆ ئەو ژمارانە بەکاری بهێنە کە وەک دەق دێن، لە args، فایلێک یان خانەیەکی دەق.
parseInt reads a number from text; toString writes it backparseInt ژمارە لە دەقەوە دەخوێنێتەوە؛ toString دەینووسێتەوەCêIT

Text that is not a number stops the program with a NumberFormatException that quotes the text. Check the input first, or catch the exception (Exceptions):

دەقێک کە ژمارە نەبێت بە NumberFormatException دەوەستێنێت کە دەقەکە دەگێڕێتەوە. سەرەتا بپشکنە، یان بگرە (هەڵاوێردەکان):

BadNumber.javaJAVAType in a terminalلە تێرمیناڵدا بینووسە
public class BadNumber {
    public static void main(String[] args) {
        int n = Integer.parseInt("twenty");
        System.out.println(n);
    }
}

remove(1): index or value?⁦remove(1)⁩: ئیندێکس یان نرخ؟

ArrayList has two remove methods: remove(int index) and remove(Object element) (overloading). With a list of Integer, remove(1) passes an int, so Java chooses the index version. To remove the value, pass an Integer object:

ArrayList دوو removeـی هەیە: remove(int index) و remove(Object element) (فرەپێناسەکردنی میتۆد). لەگەڵ Integer، remove(1) intـێک دەنێرێت، بۆیە Java وەشانی هەڵدەبژێرێت. بۆ لابردنی ، Integer بنێرە:

RemoveTrap.javaJAVAType in a terminalلە تێرمیناڵدا بینووسە
import java.util.ArrayList;

public class RemoveTrap {
    public static void main(String[] args) {
        ArrayList<Integer> numbers = new ArrayList<>();
        numbers.add(10);
        numbers.add(20);
        numbers.add(30);
        numbers.remove(1);                        // an int: remove the element at INDEX 1
        System.out.println(numbers);
        numbers.remove(Integer.valueOf(10));      // an Integer object: remove the VALUE 10
        System.out.println(numbers);
        numbers.remove(30);                       // index 30 does not exist
    }
}
A list of Integer: 10, 20, 30. numbers.remove(1); with an int means an index: the element at index 1, 20, is crossed out and the list becomes [10, 30]. numbers.remove(Integer.valueOf(10)); with an Integer means a value: 10 is crossed out and the list becomes [30]. Below: numbers.remove(30); asks for index 30: IndexOutOfBoundsException: Index 30 out of bounds for length 1.لیستێکی Integer: 10، 20، 30. numbers.remove(1); بە intـێک واتە ئیندێکس: دانەی ئیندێکسی 1، 20، خەتی لێ دەدرێت و لیستەکە دەبێتە [10, 30]. numbers.remove(Integer.valueOf(10)); بە Integerـێک واتە نرخ: 10 خەتی لێ دەدرێت و لیستەکە دەبێتە [30]. لە خوارەوە: numbers.remove(30); داوای ئیندێکسی 30 دەکات: IndexOutOfBoundsException: Index 30 out of bounds for length 1.
An int means an index; an Integer means a valueint واتە ؛ Integer واتە CêIT

Sorting a list: Collections.sortڕیزکردنی لیستێک: ⁦Collections.sort⁩

The class Collections (with an s, in java.util) does for lists what Arrays does for arrays. Collections.sort(list) sorts in ; with Collections.reverseOrder() it sorts in . Collections.max and Collections.min find the largest and smallest element:

Collections (بە sـەوە، لە java.utilـدا) بۆ ئەوە دەکات کە Arrays بۆ دەیکات. Collections.sort(list) بە ڕیز دەکات؛ بە Collections.reverseOrder() بە . Collections.max و Collections.min گەورەترین و بچووکترین دەدۆزنەوە:

SortList.javaJAVAType in a terminalلە تێرمیناڵدا بینووسە
import java.util.ArrayList;
import java.util.Collections;

public class SortList {
    public static void main(String[] args) {
        ArrayList<String> names = new ArrayList<>();
        names.add("Shilan");
        names.add("Aram");
        names.add("Karwan");
        names.add("Dilan");
        Collections.sort(names);
        System.out.println(names);
        ArrayList<Integer> marks = new ArrayList<>();
        marks.add(75);
        marks.add(90);
        marks.add(62);
        marks.add(88);
        Collections.sort(marks);
        System.out.println(marks);
        Collections.sort(marks, Collections.reverseOrder());
        System.out.println(marks);
        System.out.println("Highest: " + Collections.max(marks) + ", lowest: " + Collections.min(marks));
    }
}
Three rows. Collections.sort(names) turns Shilan, Aram, Karwan, Dilan into Aram, Dilan, Karwan, Shilan. Collections.sort(marks) turns 75, 90, 62, 88 into 62, 75, 88, 90. Collections.sort(marks, Collections.reverseOrder()) turns them into 90, 88, 75, 62. Note: Collections is in java.util; the list itself is sorted and nothing is returned.سێ ڕیز. Collections.sort(names) Shilan، Aram، Karwan، Dilan دەکات بە Aram، Dilan، Karwan، Shilan. Collections.sort(marks) 75، 90، 62، 88 دەکات بە 62، 75، 88، 90. Collections.sort(marks, Collections.reverseOrder()) دەیانکات بە 90، 88، 75، 62. تێبینی: Collections لە java.utilـدایە؛ خودی لیستەکە ڕیز دەکرێت و هیچ ناگەڕێنرێتەوە.
sort orders the list itself, ascending or with reverseOrder()sort خودی ڕیز دەکات، بەرزبوونەوە یان بە ⁦reverseOrder()⁩CêIT

Like Arrays.sort, it sorts strings by character codes, capitals first. Sorting by your own rule (by length, by a mark inside an object) needs a comparator: Comparator. Python's sort() and sorted() are in sort and sorted.

وەک Arrays.sort، بەپێی کۆدی ڕیز دەکات، پیتی گەورە یەکەم. بەپێی یاسای خۆت (بە درێژی، بە نمرەیەک لە ناو ) comparatorـێکی پێویستە: Comparator. sort() و sorted()ـی Python لە sort و sortedـدان.

The List interfaceنێوبەستەی List

Programmers often declare the variable with the type List and create an ArrayList: List<String> cities = new ArrayList<>();. List is an : a list of methods that a list promises (add, get, size …). ArrayList is one class that keeps the promise, LinkedList another (One method for both: the List interface). Why an interface can be the type of a variable is explained in An interface is also a type.

بەرنامەسازان زۆر جار بە جۆری List دەناسێنن و ArrayListـێک دروست دەکەن: List<String> cities = new ArrayList<>();. List : لیستێک لە کە بەڵێنیان دەدات (add، get، size …). ArrayList کە بەڵێنەکە دەباتە سەر و LinkedListـیش یەکێکی ترە (یەک میتۆد بۆ هەردووکیان: نێوبەستەی List). بۆچی دەتوانێت جۆری بێت لە نێوبەستە جۆریشەـدا ڕوون کراوەتەوە.

Cities.javaJAVAType in a terminalلە تێرمیناڵدا بینووسە
import java.util.ArrayList;
import java.util.List;

public class Cities {
    public static void main(String[] args) {
        List<String> cities = new ArrayList<>();
        cities.add("Hawler");
        cities.add("Duhok");
        cities.add("Halabja");
        System.out.println(cities + " " + cities.size());
    }
}
A dashed box interface List<E> with the methods add, get, set, remove, size: a list of promised methods. Two class boxes point up to it: ArrayList<E>, an array inside with a fast get(i), and LinkedList<E>, a chain of nodes for a later lesson. Note: List<String> cities = new ArrayList<>(); the variable promises only what List has.سندووقێکی پچڕپچڕی interface List<E> بە میتۆدەکانی add، get، set، remove، size: لیستێک لە میتۆدەکانی بەڵێندراو. دوو سندووقی کلاس ئاماژەی بۆ دەکەن: ArrayList<E>، ڕیزەکێک لە ناوەوە بە get(i)ـی خێرا و LinkedList<E>، زنجیرەیەک نۆد بۆ وانەیەکی دواتر. تێبینی: List<String> cities = new ArrayList<>(); گۆڕاوەکە تەنیا ئەوە بەڵێن دەدات کە List هەیەتی.
List is the promise; ArrayList and LinkedList keep itList بەڵێنەکەیە؛ ArrayList و LinkedList دەیبەنە سەرCêIT

Array or ArrayList?ڕیزەک یان ArrayList؟

WhatچیArrayArrayList ⁦(ArrayList)⁩
lengthدرێژیfixed: a.lengthجێگیر: a.lengthgrows: list.size()گەورە دەبێت: list.size()
read / changeخوێندنەوە / گۆڕینa[i] a[i] = xlist.get(i) list.set(i, x)
element typesجۆری primitives and objects: int[]سەرەتایی و : int[]objects only: ArrayList<Integer>تەنیا : ArrayList<Integer>
add, removeزیادکردن، لابردنno (copy into a new array)نا ( نوێ کۆپی بکە)add(x) remove(i)
printingچاپکردنArrays.toString(a)System.out.println(list)
helpersیارمەتیدەرArrays.sort Arrays.fillCollections.sort Collections.max

Use an array when the number of elements is known and fixed (the seven days, a 3×33 \times 3 board) or for primitive values in large amounts; use an ArrayList when elements come and go. Python's list is like an ArrayList (ArrayList: Java's growing list). To look values up by a key, or to keep each value only once, see ArrayList, HashMap or HashSet?

کاتێک ژمارەی زانراو و جێگیرە (حەوت ڕۆژەکە، تەختەیەکی 3×33 \times 3) یان بۆ سەرەتایی بە بڕی زۆر بەکار بهێنە؛ کاتێک دێن و دەڕۆن ArrayList بەکار بهێنە. Python وەک ArrayList وایە (ArrayList: لیستی گەورەبووی Java). بۆ دۆزینەوەی بە ، یان هەڵگرتنی هەر تەنیا یەک جار، ArrayList، HashMap یان HashSet؟ ببینە.

A program: the shopping listبەرنامەیەک: لیستی بازاڕ

The user types items until done (a : Read until 0). The program skips an item that is already in the list, sorts the list and prints it with numbers:

کاڵاکان دەنووسێت تا done (: تا 0 بخوێنەوە). ئەو کاڵایەی پێشتر لە بەجێ دەهێڵێت، ڕیز دەکات و بە ژمارەوە چاپی دەکات:

ShoppingList.javaJAVAType in a terminalلە تێرمیناڵدا بینووسە
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class ShoppingList {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        ArrayList<String> items = new ArrayList<>();
        System.out.println("Type the items, one per line. Type done to finish.");
        while (true) {
            System.out.print("> ");
            String item = input.nextLine();
            if (item.equals("done")) {
                break;
            }
            if (!items.contains(item)) {          // no item twice
                items.add(item);
            }
        }
        Collections.sort(items);
        System.out.println("Your list (" + items.size() + " items):");
        for (int i = 0; i < items.size(); i++) {
            System.out.println((i + 1) + ". " + items.get(i));
        }
    }
}
The typed lines tea, bread, sugar, tea, cheese and done. Arrows carry tea, bread, sugar and cheese into the list; the second tea is crossed out, already in the list; done is the sentinel and ends the loop with break. The list tea, bread, sugar, cheese becomes bread, cheese, sugar, tea after Collections.sort, and the output numbers them 1 to 4: size() = 4.دێڕە نووسراوەکان tea، bread، sugar، tea، cheese و done. تیرەکان tea، bread، sugar و cheese دەبەنە ناو لیستەکە؛ teaـی دووەم خەتی لێ دراوە، پێشتر لە لیستەکەدایە؛ done نرخی پاسەوانە و بە break خولەکە کۆتایی پێ دەهێنێت. لیستی tea، bread، sugar، cheese دوای Collections.sort دەبێتە bread، cheese، sugar، tea و دەرخستەکە لە 1 تا 4 ژمارەیان دەکات: size() = 4.
contains stops repeats, sort orders, size countscontains ڕێگە لە دووپاتە دەگرێت، sort ڕیز دەکات، size دەژمێرێتCêIT

Common mistakesهەڵە باوەکان

You wroteنووسیتjavac or the run saysjavac یان جێبەجێکردن دەڵێتFixچارەسەر
ArrayList<int>unexpected type required: reference found: intArrayList<Integer>.ArrayList<Integer>.
no import java.util.ArrayList;هیچ import java.util.ArrayList;ـێک نییەcannot find symbol symbol: class ArrayListAdd the import.importـەکە زیاد بکە.
names.lengthcannot find symbol symbol: variable lengthnames.size().names.size().
names[0]array required, but ArrayList<String> foundnames.get(0).names.get(0).
names.sizesize has private access in ArrayListnames.size() with brackets.names.size() بە کەوانەوە.
names.get(names.size())IndexOutOfBoundsException: Index 3 out of bounds for length 3The last index is size() - 1.دوایین size() - 1ـە.
remove(1) on ArrayList<Integer> to remove the value 1remove(1) لەسەر ArrayList<Integer> بۆ لابردنی 1removes index 1 1 لادەباتremove(Integer.valueOf(1)).remove(Integer.valueOf(1)).
list.remove(x) inside for-eachlist.remove(x) لە ناو ConcurrentModificationExceptionCount backwards, or removeIf.بە پاشەوە بژمێرە، یان removeIf.
Integer a = 128, b = 128; a == bfalsefalsea.equals(b).a.equals(b).
unboxing a null Integerکردنەوەی Integerـێکی nullNullPointerException ... intValue()Give the element a value first.سەرەتا بدە بە .

Three of these messages in full, as javac prints them:

سێ لەم پەیامانە بە تەواوی، وەک javac چاپیان دەکات:

Outputدەرئەنجام
$ javac ListMistakes.java
ListMistakes.java:7: error: cannot find symbol
        System.out.println(names.length);
                                ^
  symbol:   variable length
  location: variable names of type ArrayList<String>
ListMistakes.java:8: error: array required, but ArrayList<String> found
        System.out.println(names[0]);
                                ^
ListMistakes.java:9: error: size has private access in ArrayList
        System.out.println(names.size);
                                ^
3 errors

Practiceڕاهێنان

ExerciseڕاهێنانA class registerدەفتەری پۆل

Read a number n, then n lines of a name and a mark. Keep the names in one list and the marks in another, then print how many students there are and who has the best mark.

ژمارەیەکی n بخوێنەوە، پاشان n دێڕی ناو و نمرە. ناوەکان لە و نمرەکان لە یەکێکی تردا هەڵبگرە، پاشان چاپ بکە چەند قوتابی هەن و کێ باشترین نمرەی هەیە.

Show answerوەڵامەکە پیشان بدە
Register.javaJAVAType in a terminalلە تێرمیناڵدا بینووسە
import java.util.ArrayList;
import java.util.Scanner;

public class Register {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        ArrayList<String> present = new ArrayList<>();
        ArrayList<Integer> marks = new ArrayList<>();
        int n = input.nextInt();                  // how many students
        for (int i = 0; i < n; i++) {
            present.add(input.next());
            marks.add(input.nextInt());
        }
        int best = 0;
        for (int i = 1; i < marks.size(); i++) {
            if (marks.get(i) > marks.get(best)) {
                best = i;
            }
        }
        System.out.println(present.size() + " students: " + present);
        System.out.println("Best: " + present.get(best) + " with " + marks.get(best));
    }
}

The same index joins the two lists, as with two arrays: present.get(best) belongs to marks.get(best).

هەمان هەردوو دەبەستێتەوە، وەک دوو : present.get(best) هی marks.get(best)ـە.

ExerciseڕاهێنانFrom an array to a listلە ڕیزەکەوە بۆ لیست

Copy the elements of String[] fixed = {"Aram", "Shilan", "Karwan"}; into an ArrayList<String>, add "Dilan" and print the list and its size.

String[] fixed = {"Aram", "Shilan", "Karwan"}; کۆپی بکە بۆ ناو ArrayList<String>ـێک، "Dilan" زیاد بکە و و قەبارەکەی چاپ بکە.

Show answerوەڵامەکە پیشان بدە
FromArray.javaJAVAType in a terminalلە تێرمیناڵدا بینووسە
import java.util.ArrayList;
import java.util.Arrays;

public class FromArray {
    public static void main(String[] args) {
        String[] fixed = {"Aram", "Shilan", "Karwan"};
        ArrayList<String> list = new ArrayList<>();
        for (String name : fixed) {
            list.add(name);
        }
        list.add("Dilan");
        System.out.println(list + " " + list.size());
        ArrayList<String> quick = new ArrayList<>(Arrays.asList(fixed));   // the same in one line
        System.out.println(quick);
    }
}

new ArrayList<>(Arrays.asList(fixed)) does the same in one line. (Arrays.asList alone gives a list that cannot grow, which is why it is wrapped in new ArrayList<>.)

new ArrayList<>(Arrays.asList(fixed)) هەمان کار لە یەک دێڕدا دەکات. (Arrays.asList بە تەنیا دەدات کە گەورە نابێت، بۆیە لە ناو new ArrayList<>ـدا دادەنرێت.)

ExerciseڕاهێنانSquares, reversedدووجاکان، پێچەوانە

Fill an ArrayList<Integer> with the squares of 1 to 5, reverse it with Collections.reverse, and print the list and its last element.

ArrayList<Integer>ـێک بە دووجای 1 تا 5 پڕ بکەرەوە، بە Collections.reverse پێچەوانەی بکەرەوە و و دوایین چاپ بکە.

Show answerوەڵامەکە پیشان بدە
ReverseList.javaJAVAType in a terminalلە تێرمیناڵدا بینووسە
import java.util.ArrayList;
import java.util.Collections;

public class ReverseList {
    public static void main(String[] args) {
        ArrayList<Integer> numbers = new ArrayList<>();
        for (int i = 1; i <= 5; i++) {
            numbers.add(i * i);
        }
        System.out.println(numbers);
        Collections.reverse(numbers);
        System.out.println(numbers);
        System.out.println("Last: " + numbers.get(numbers.size() - 1));
    }
}
ExerciseڕاهێنانLong wordsوشە درێژەکان

Split the sentence "Java keeps every program safe from wrong indexes" into words and collect the words of 5 letters or more, in capitals, in a list.

ڕستەی "Java keeps every program safe from wrong indexes" بکە بە وشە و ئەو وشانەی 5 پیت یان زیاترن، بە پیتی گەورە، لە کۆ بکەرەوە.

Show answerوەڵامەکە پیشان بدە
CountLong.javaJAVAType in a terminalلە تێرمیناڵدا بینووسە
import java.util.ArrayList;

public class CountLong {
    public static void main(String[] args) {
        String sentence = "Java keeps every program safe from wrong indexes";
        ArrayList<String> longWords = new ArrayList<>();
        for (String word : sentence.split(" ")) {
            if (word.length() >= 5) {
                longWords.add(word.toUpperCase());
            }
        }
        System.out.println(longWords + " " + longWords.size());
    }
}

split(" ") returns a String[] (split); the for-each loop reads it, and the list grows only for the words that pass the test.

split(" ") String[]ـێک دەگەڕێنێتەوە (split)؛ دەیخوێنێتەوە و تەنیا بۆ ئەو وشانە گەورە دەبێت کە لە تاقیکردنەوەکە دەردەچن.

ExerciseڕاهێنانRemove the failing marksنمرە کەوتووەکان لاببە

Remove every mark below 50 from a list [90, 45, 30, 75] without an exception and without skipping any mark.

هەموو نمرەیەکی خوار ⁦50⁩ لە [90, 45, 30, 75] لاببە، بەبێ و بەبێ ئەوەی بازی بەسەر هیچ نمرەیەکدا بدەیت.

Show answerوەڵامەکە پیشان بدە

Count backwards (shown above in Removing elements inside a loop), or use marks.removeIf(m -> m < 50);. Both give [90, 75].

بە پاشەوە بژمێرە (لە سەرەوە لە لابردنی دانەکان لە ناو خولێکدا نیشان درا)، یان marks.removeIf(m -> m < 50); بەکار بهێنە. هەردووکیان [90, 75] دەدەن.

Summaryکورتە

  • ArrayList<E> (java.util) is a list that grows: add, add(i, x), get, set, remove, size, contains, indexOf, clear, isEmpty.
  • Indexes run from 0 to size() - 1; others throw IndexOutOfBoundsException.
  • Loop with get(i) or for-each; remove inside a loop only when counting backwards (or with removeIf).
  • Lists hold objects: wrapper classes (Integer, Double, Character, Boolean …) with autoboxing and unboxing; beware null and ==.
  • Integer.parseInt reads numbers from text; remove(1) removes index 1, remove(Integer.valueOf(1)) the value 1.
  • Collections.sort (also with reverseOrder()), max, min, reverse; declare with List<E> when you like.
  • ArrayList<E> ⁦(java.util)⁩ کە گەورە دەبێت: add، add(i, x)، get، set، remove، size، contains، indexOf، clear، isEmpty.
  • لە 0ـەوە تا size() - 1 دەڕۆن؛ ئەوانی تر IndexOutOfBoundsException فڕێ دەدەن.
  • بە get(i) یان بسووڕێوە؛ لە ناو تەنیا بە ژماردن بە پاشەوە لاببە (یان بە removeIf).
  • هەڵدەگرن: (Integer، Double، Character، Boolean …) بە و کردنەوە؛ ئاگاداری null و == بە.
  • Integer.parseInt ژمارە لە دەقەوە دەخوێنێتەوە؛ remove(1) 1 لادەبات و remove(Integer.valueOf(1)) 1.
  • Collections.sort (هەروەها بە reverseOrder())، max، min، reverse؛ ئەگەر دەتەوێت بە List<E> بیناسێنە.
Review questionsپرسیارەکانی پێداچوونەوە
Why can't you write ArrayList<int>?بۆچی ناتوانیت ArrayList<int> بنووسیت؟

A list holds objects only; int is a primitive type. Use its wrapper class: ArrayList<Integer>.

تەنیا هەڵدەگرێت؛ int . بەکار بهێنە: ArrayList<Integer>.

What is the difference between set(1, x) and add(1, x)?جیاوازیی نێوان set(1, x) و add(1, x) چییە؟

set replaces the element at index 1 (the size stays); add inserts x there and moves the rest right (the size grows by 1).

set 1 دەگۆڕێتەوە (قەبارە وەک خۆی دەمێنێت)؛ add x لەوێ دەخاتە ناوەوە و ئەوانی تر بۆ ڕاست دەجووڵێنێت (قەبارە 1 زیاد دەکات).

A list of Integer is [10, 20, 30]. What does remove(1) leave?لیستێکی Integer دەکاتە [10, 20, 30]. remove(1) چی دەهێڵێتەوە؟

[10, 30]: the int 1 is an index.

[10, 30]: intـی 1 .

Lesson complete!وانەکە تەواو بوو!

Well done. Review the key terms, then go on to the next lesson.دەستخۆش. سەیرێکی زاراوە سەرەکییەکان بکەرەوە، پاشان بڕۆ بۆ وانەی داهاتوو.

Key termsزاراوە سەرەکییەکان

Next lessonوانەی داهاتوو

Classes and Objects: Attributes and Methodsکلاسەکان و ئۆبجێکتەکان: تایبەتمەندییەکان و میتۆدەکان

References and further readingسەرچاوەکان و خوێندنەوەی زیاتر

This lecture is a first edition. The Kurdish text and terminology are waiting for review by Kurdish IT teachers.ئەم وانەیە چاپی یەکەمە. دەقە کوردییەکە و زاراوەکانی چاوەڕێی پێداچوونەوەی مامۆستایانی کوردی بواری IT ن.

Appearanceڕووکار

Modeدۆخ
Styleشێواز
Coloursڕەنگەکان

Saved on this device only.تەنیا لەسەر ئەم ئامێرە پاشەکەوت دەکرێت.