How can i create a dictionary in java | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How can i create a dictionary in java

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

3rd Mar 2021, 11:39 AM
Aila Jan
Aila Jan - avatar
1 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"); } }
3rd Mar 2021, 12:12 PM
Nothing
Nothing - avatar