I have a text file that looks something like this:
1 Song one
2 Song two
3 Song three
...
How do I read a line by line and extract number and String separately from a single line, and let's say print them to the console with:
String title; // extracted from current line
int num; // extracted from current line
System.out.println("Number: " + num + "Title: " + title);