I'm reading from a file and using a scanner to read the inputs but am having difficulty understanding how to apply next() and nextLine() to assign data from the text to variables to be sent to my rectangle class constructor for printing these objects to the console. I get parsing the input (nextInt...etc.), but when strings and primitive data mix on the same line on multiple lines of a scanner read text file how do you handle this? Do I create multiple scanner loops for ints and String(s) to loop through it all to ensure the read data gets assigned to the array elements correctly?
TLDR: How do I read multiple strings and primitives from one .txt file, populate that data into my class fields to then create an array of objects and print *'s to the console to symbolize my created "rectangular" objects from said .txt file?