Answered step by step
Verified Expert Solution
Question
1 Approved Answer
How do I take string data stored in an ArrayList and send it to a method with multiple data types in Java. the String data
How do I take string data stored in an ArrayList
11 14 2016 0 0 0 NY 0 Yes 01 23 2017 1 1 1 IL 1 Yes 04 06 2016 2 2 2 OH 0 Yes 11 14 2017 3 3 3 TX 1 Yes 10 16 2017 4 4 2 NY 0 Yes 09 05 2016 5 5 4 NC 0 Yes 02 25 2018 4 6 5 AL 0 Yes 10 07 2015 1 7 6 NY 1 Yes 08 29 2018 6 8 7 IA 0 Yes
and the method will take elements 1 through 6 and 8 as an intergers, and elements 7 and 9 as Strings for it's parameter. I'm using the split method to break up the data and then send it to the method and this method will create an object with all 9 elements of the data.
I also need to skip to the next object in the ArrayList if the data can't be parsed to an interger or string
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started