Im having this issue which I dont understand. Any advice?

enter image description here

  • 4
    Please don't put screenshots of code on StackExchange! No one having the same issue will be able to find this page later by searching on this site, e.g. using the keyword "split". This is just one of the many reasons code should be provided as text here. (The return value of split(...) in your line four is necessarily a List of Strings, which is a very different animal from a List of Orders.) You can't assign one to the other. Mar 28 at 21:06

1 Answer 1


The error tells you exactly what is wrong, as does the documentation on the String.split method. It returns List<String>, not List<Order>.


List<Order> values = myString.split(delimiter);


List<String> values = myString.split(delimiter);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.