I actually have it workign using string.tokenizer, however i know this is depricated
I have tried several variations and i have no idea as to why it is doing this. any help at all would be appreciated.
Is there a better way to do this? I want to eventually create an array of objects so i want to assign each part of the string to a variable, it just seems a bit wasteful to read it into one array, then assign the variables, then create a second array of objects. I'd much prefer finding a way to do this using only one array.
I am not sure how you would use two scanners - can you elaborate a bit more please?
Then you create an instance of Product for each line you read in and set the value of each of the fields
I am not sure how to assign a string of values to an object without going through the string and splitting the string first.
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koophttps://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton