Java HashMap

Posted: September 16, 2014 in Java
Tags:

Burada elemanlar anahtar değerlerle birlikte saklanır.Anahtar değerler arasında kopya eleman bulunmaz.Elemanlar arasında kopya eleman bulunabilir.

import java.util.HashMap;

public class JavaApplication21 {

public static void main(String[] args) {

HashMap x = new HashMap();

x.put(3,”bayram”);
x.put(5,”cihad”);
x.put(7,”zafer”);
x.put(9,”memo”);

System.out.println(x);
System.out.println(x.keySet());

}

}

hashmap

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s