0
How can give input for dictionary in java
3 Réponses
+ 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.
+ 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();
+ 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.