+ 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); } }

9th Jan 2022, 12:04 PM
Amine Hazmiri
Amine Hazmiri - avatar
1 Odpowiedź
0
I don't (yet) know Java, but your dictionary is a great idea!
10th Jan 2022, 10:05 AM
HungryTradie
HungryTradie - avatar