Subscribe For Free Updates!

We'll not spam mate! We promise.

ArrayList

package strukturdata;
import java.util.ArrayList;
public class StrukturData {
public static void main(String[] args) {
ArrayList arLis = new ArrayList();
arLis.add(4);
arLis.add("zainul");
arLis.add(3.0999);
System.out.println(arLis);
System.out.println("size arLis :"+arLis.size());
System.out.println(arLis.get(1));
arLis.add(1, "OOP");
System.out.println(arLis);
}
}

Output :
[4, zainul, 3.0999]
size arLis :3
zainul
[4, OOP, zainul, 3.0999]

Socializer Widget By Blogger Yard
SOCIALIZE IT →
FOLLOW US →
SHARE IT →

0 komentar:

Post a Comment