+ 3
Jungle camping
import java.util.Map; import java.util.Scanner; public class JungleCamping { public static void main(String[] args) { final var animals = Map.of( "Grr", "Lion ", "Rawr", "Tiger ", "Ssss", "Snake ", "Chirp", "Bird "); newScanner(System.in).tokens().map(animals::get).forEach(System.out::print); } }
1 Odpowiedź
0
I don't (yet) know Java, but your dictionary is a great idea!