Need help to translation program
HI
i need a bit help to know what's wrong here... the problem is that it only will translate the first word. I need it to translate a sentence by using the java.util.Scanner. Heres the code:
import java.util.*;
publicclass Main
{
publicstaticvoid main(String[] args)
{
java.util.Scanner tastatur =new java.util.Scanner(System.in);
HashMap<String,String> ord =new HashMap<String,String>();
ord.put("hello","hej");
ord.put("my","mit");
ord.put("name","navn");
ord.put("is","er");
ord.put("and","og");
ord.put("i","jeg");
ord.put("am","er");
ord.put("have","har");
String engelsk = tastatur.next();
for (String dansk : engelsk.split("\\b") )
{
String da = ord.get( dansk );
if (da ==null) da=dansk;
System.out.print( da );
}
}
}
Sorry for my bad english...

