0

How can give input for dictionary in java

7th Sep 2020, 6:46 PM
Anish G
Anish G - avatar
3 ответов
+ 2
You have to import scanner class first like this import java.util.Scanner; Then write this in your main method to create an object of the Scanner, write like this Scanner input = new Scanner (System.in); Use this to get and store users input for Integer Int I = input.nextInt(); it also varies to double and string.
7th Sep 2020, 10:33 PM
Sunday Othniel
Sunday Othniel - avatar
+ 1
You need to import java.util.Scanner; Then create an object of this class using Scanner sc =new Scanner(System.in); Then use one of is methods to store input to string like so... String input = sc.nextLine();
7th Sep 2020, 9:08 PM
D_Stark
D_Stark - avatar
+ 1
Do you mean about dictionary word or dictionary data structure inputs..? If 2nd,then java have HashMap, hash Table for that. Dictionary is not there now in java.
7th Sep 2020, 11:06 PM
Jayakrishna 🇮🇳