-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathMyStack.java
More file actions
29 lines (25 loc) · 725 Bytes
/
Copy pathMyStack.java
File metadata and controls
29 lines (25 loc) · 725 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Map;
import java.util.Stack;
/**
* Created with IntelliJ IDEA.
* User: windows 7
* Date: 12/5/14
* Time: 7:41 PM
* To change this template use File | Settings | File Templates.
*/
public class MyStack {
public static void main(String[] args)
{
Stack stack = new Stack();
Map map = new Hashtable();
Hashtable<String,String> stringStringHashtable = new Hashtable<String, String>();
stringStringHashtable.put("1","2");
while(!stringStringHashtable.isEmpty())
{
System.out.println(stringStringHashtable.get("1"));
stringStringHashtable.remove("1");
}
}
}