whereby each separated value by space is a row in my database table. I want to insert the 5 separate values per loop. I want to insert all these lines into my database but am not sure on exactly how. This is also a working connection to my database as of now.
This is my rough idea:
I am using Java and not android.
Any help is amazing.
Lines 5 to 7 of your posted code are Java translations of this pseudo-code:
For each array of String in the List:
You need to decide what is that "something" which you want done, and then write Java code for that.
So what exactly do you want to do with an array of String objects?
Hint: That doesn't mean "What Java code do you want to write?" It means "Explain in English what you want done."
Hint: What would you do if you only had one array of Strings?
posted 3 months ago
i want to place them into an insert statement but i imagine the easiest way to do this would be to assign them to variables.
i want as
and then to somehow insert these variables into my database (with a prepared statement?). Because im using an arrayList i find it very confusing. I think i have to split each line up and then assign through a loop would you not think?