How can i create a dictionary in java | SoloLearn: Learn to code for FREE!

0

How can i create a dictionary in java

I want to create a dictionary from english to pashto please guide me

3/3/2021 11:39:48 AM

Aila Jan

1 Answer

New Answer

+1

i am not expert in java but you can use HashMap For It, eg: import java.util.HashMap; public class Main { public static void main(String[] args) { HashMap<String, String> pashto = new HashMap<String, String>(); pashto.put("word in english", "word in pashto"); System.out.println(pashto.get("word in english"); } }