Contain a single arrav to contain the tollowine tive Enelish words and a
TWO
dimensional array to store the following Dutch, French and Italian translated words
ENGLISH WORD
DUTCH WORD
VI FRENCH WORD
ITALIAN WORD
hemel
ciel
cielo
run
rennen
courir
carrare
study
studie
mUSC
muzipk
musE
musica
dog
hond
chipn
cane
18. 10. 20
Q.2.2 Print out each English word with the translated Dutch, French and Italian word.
public class Main {
public static void main(String[] args) {
String[] english = {"sky", "study", "music", "run", "dog"};
String[][] translate = {{"cielo", "studia", "musica", "correre", "cane"},
{"ciel", "etude", "musique", "courir", "chien"},
{"hemel", "studie", "muziek", "rennen", "hond"}};
System.out.println("English words");
System.out.println(english[0]+" "+english[1]+" "+english[2]+" "+english[3]+" "+english[4]);
System.out.println(translate[0][0]+" "+translate[0][1]+" "+
translate[0][2]+" "+translate[0][3]+" "+translate[0][4]);
System.out.println("\nDUTCH words");
System.out.println(translate[1][0]+" "+translate[1][1]+" "+
translate[1][2]+" "+translate[1][3]+" "+translate[1][4]);
System.out.println("\nFRENCH words");
System.out.println(translate[2][0]+" "+translate[2][1]+" "+
translate[2][2]+" "+translate[2][3]+" "+translate[2][4])
;}
}
Comments
Leave a comment