Java Collections : Collection – Ukuran Collection

Oleh : Reza Ervani

بسم الله الرحمن الرحيم

Rujukan :

http://tutorials.jenkov.com/java-collections/collection.html

Ukuran Collection

Kita dapat memeriksa ukuran dari suatu collection menggunakan metode  size() . “size” berarti jumlah elemen yang terdapat di dalam collection. Berikut contohnya :

[code language=”java”]

int numberOfElements = collection.size();

[/code]

 

About Reza Ervani 425 Articles
Adalah pendiri programming.rezaervani.com -

Be the first to comment

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.