/* =========================== Dictionary entry =========================== */ class Dict { public String key; public String val; public Dict(String key, String val) { this.key = key; this.val = val; } } public class Array { public static void main( String[] args ) { Dict[] myWords; // Array of dictionary words myWords = new Dict[10]; myWords[0] = new Dict("ape", "uh-uh"); myWords[1] = new Dict("cat", "miauw"); myWords[2] = new Dict("cow", "moo"); myWords[3] = new Dict("dog", "woof"); myWords[4] = new Dict("donkey", "i-oh"); myWords[5] = new Dict("jackal", "a-uuh"); myWords[6] = new Dict("horse", "brrr"); myWords[7] = new Dict("lion", "roar!!"); myWords[8] = new Dict("tiger", "roar!"); myWords[9] = new Dict("zebra", "brrrr"); for ( int i = 0; i < myWords.length; i++ ) System.out.println( myWords[i].key + " ==> " + myWords[i].val); } }