Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

Java

import java.util.*;

public class HelloMom {

     public static void main(String[] args) {
         Hashtable<String, String> ht = new Hashtable<String, String>();
    
        ht.put("Answer", "42");
        ht.put("Hello", "World");    // First value association for "Hello" key.
        ht.put("Hello", "Mom");      // Second value association for "Hello" key.
    
        for (Map.Entry<String, String> e : ht.entrySet()) {
          System.out.println(e);
        }
    }
}

Output

Answer=42
Hello=Mom

There is a pesky = in there, but this is the best I could do

http://stackoverflow.com/a/1050075/573421https://stackoverflow.com/a/1050075/573421

Java

import java.util.*;

public class HelloMom {

     public static void main(String[] args) {
         Hashtable<String, String> ht = new Hashtable<String, String>();
    
        ht.put("Answer", "42");
        ht.put("Hello", "World");    // First value association for "Hello" key.
        ht.put("Hello", "Mom");      // Second value association for "Hello" key.
    
        for (Map.Entry<String, String> e : ht.entrySet()) {
          System.out.println(e);
        }
    }
}

Output

Answer=42
Hello=Mom

There is a pesky = in there, but this is the best I could do

http://stackoverflow.com/a/1050075/573421

Java

import java.util.*;

public class HelloMom {

     public static void main(String[] args) {
         Hashtable<String, String> ht = new Hashtable<String, String>();
    
        ht.put("Answer", "42");
        ht.put("Hello", "World");    // First value association for "Hello" key.
        ht.put("Hello", "Mom");      // Second value association for "Hello" key.
    
        for (Map.Entry<String, String> e : ht.entrySet()) {
          System.out.println(e);
        }
    }
}

Output

Answer=42
Hello=Mom

There is a pesky = in there, but this is the best I could do

https://stackoverflow.com/a/1050075/573421

added 110 characters in body
Source Link
iamkrillin
  • 290
  • 1
  • 8

Java

import java.util.*;

public class HelloMom {

     public static void main(string[]String[] args) {
         Hashtable<String, String> ht = new Hashtable<String, String>();
    
        ht.put("Answer", "42");
        ht.put("Hello", "World");    // First value association for "Hello" key.
        ht.put("Hello", "Mom");      // Second value association for "Hello" key.
    
        for (Map.Entry<String, String> e : ht.entrySet()) {
          System.out.println(e);
        }
    }
}

Output

Answer=42
Hello=Mom

There is a pesky = in there, but this is the best I could do

http://stackoverflow.com/a/1050075/573421

Java

public static void main(string[] args) {
     Hashtable<String, String> ht = new Hashtable<String, String>();
    
    ht.put("Answer", "42");
    ht.put("Hello", "World");    // First value association for "Hello" key.
    ht.put("Hello", "Mom");      // Second value association for "Hello" key.
    
    for (Map.Entry<String, String> e : ht.entrySet()) {
      System.out.println(e);
    }
}

http://stackoverflow.com/a/1050075/573421

Java

import java.util.*;

public class HelloMom {

     public static void main(String[] args) {
         Hashtable<String, String> ht = new Hashtable<String, String>();
    
        ht.put("Answer", "42");
        ht.put("Hello", "World");    // First value association for "Hello" key.
        ht.put("Hello", "Mom");      // Second value association for "Hello" key.
    
        for (Map.Entry<String, String> e : ht.entrySet()) {
          System.out.println(e);
        }
    }
}

Output

Answer=42
Hello=Mom

There is a pesky = in there, but this is the best I could do

http://stackoverflow.com/a/1050075/573421

Source Link
iamkrillin
  • 290
  • 1
  • 8

Java

public static void main(string[] args) {
     Hashtable<String, String> ht = new Hashtable<String, String>();
    
    ht.put("Answer", "42");
    ht.put("Hello", "World");    // First value association for "Hello" key.
    ht.put("Hello", "Mom");      // Second value association for "Hello" key.
    
    for (Map.Entry<String, String> e : ht.entrySet()) {
      System.out.println(e);
    }
}

http://stackoverflow.com/a/1050075/573421