• Nie Znaleziono Wyników

int amount = books.size

N/A
N/A
Protected

Academic year: 2021

Share "int amount = books.size"

Copied!
1
0
0

Pełen tekst

(1)

public void preparebooks(ArrayList<String> books) {

if (books == null) { books_ = null;

return;

}

int amount = books.size();

if (amount > 0) {

Option help[] =

new Option[amount];

Iterator<String> iterator = books.iterator();

int i = 0;

while (iterator.hasNext()) { String a1=

Integer.toString(i);

String a2 =

iterator.next();

help[i++] =

new Option(a1, a2);

}

books_ = help;

} else {

books_ =

new Option[0];

} }

Cytaty