[Solved] Taking input of a graph from text file in java till the end of file [closed]


a fast google search popped up this example https://www.mkyong.com/java8/java-8-stream-read-a-file-line-by-line/.

for each line you get a String. split the string on whitespace:

String[] lineArr = line.split(" ");

Then use the 3 values in the array to create your stuff. easy peasy 🙂

0

solved Taking input of a graph from text file in java till the end of file [closed]