Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
20
Task/Arrays/Ceylon/arrays.ceylon
Normal file
20
Task/Arrays/Ceylon/arrays.ceylon
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import ceylon.collection {
|
||||
|
||||
ArrayList
|
||||
}
|
||||
|
||||
shared void run() {
|
||||
|
||||
// you can get an array from the Array.ofSize named constructor
|
||||
value array = Array.ofSize(10, "hello");
|
||||
value a = array[3];
|
||||
print(a);
|
||||
array[4] = "goodbye";
|
||||
print(array);
|
||||
|
||||
// for a dynamic list import ceylon.collection in your module.ceylon file
|
||||
value list = ArrayList<String>();
|
||||
list.push("hello");
|
||||
list.push("hello again");
|
||||
print(list);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue