I want to create two string arrays with words i give through a scanner, but the compiler keeps telling me "cannot find symbol variable in" in Scanner.in. How do i solve it?
import java.util.Scanner;
public class FollowerInsight {
public static void main (String[] args) {
Scanner fr = new Scanner(Scanner.in);
Scanner fg = new Scanner(Scanner.in);
String followers[] = new String[fr];
String following[] = new String[fg];
}
}
Now its giving me "incompatible types: java.util.Scanner cannot be converted to int" on fr and fg. What should i do?
String followers[] = new String[fr];
String following[] = new String[fg];
What im trying to do is to connect what I wrote on the scanner to fill the string list. Im sorry im new on programming