Skip to content

Vjorald/hashtable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

hashtable

import java.util.Enumeration; import java.util.Hashtable;

public class HashtableTest {

public static void main(String[] args) {
	Hashtable h = new Hashtable();
	
	h.put("Willi Frankien", "[email protected]");
	h.put("Hugo Meier", "[email protected]");
	h.put("Sabine Moll", "[email protected]");
	
	System.out.println("NAME -> ADRESSE");
	
	Enumeration keys = h.keys();
	
	while (keys.hasMoreElements()){
		String key = (String) keys.nextElement();
		String value = (String) h.get(key);
		System.out.println(key + " -> " + value);
	}

	System.out.println();
	
	System.out.println("Email- Adressen: ");
	Enumeration elements = h.elements();
	
	while (elements.hasMoreElements()){
		String value = (String) elements.nextElement();
		System.out.println(value);
	}
}

}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published