Perdona, ed il costrutto for-each style come lo traduco?
Codice PHP:
// costrutto while list in PHP.
while (list($chiave,$valore) = each($myarray))
{
echo $valore." - ";
}
Il codice JAVA, come mi hai suggerito è:
codice:
Hashtable table = new Hashtable();
table.put("chiave1", "valore1");
table.put("chiave2", "valore2");
table.put("chiave3", "valore3");
for (int i = 4; i <= 6; i++) table.put("chiave"+i, "valore"+i);
for (int i = 0; i <= table.size(); i++) System.out.println(table.get("chiave"+i));
// while list ???