I am having trouble figuring out how to read input from the keyboard and inserting that into a LinkedList. Any help or suggestions would be greatly appreciated.
import java.util.*;
import java.util.Scanner;
import java.io.*;
public class listlist{
public static void main(String [] args){
LinkedList ll = new LinkedList();
Scanner in = new Scanner(System.in);
System.out.println("Enter a number: ");
int n = in.nextInt();
ll.add(n);
}
}