I have a file that looks like follows:
What I need is to read only names (first column) and output it.
while (sc.hasNext())
System.out.println(sc.next());
Another solution I tried is:
while (sc.hasNextLine())
System.out.println(sc.nextLine());
The ones that are above obviously don't work. I am stuck and don't know what to do. I was trying to google my problem but couldn't find the answer.