I'm having difficulty understanding the concept of Dao and how I could create a specific type to store my data, I'm initially using an ArrayList of Strings and need to adapt it to an ArrayList of Object Product, which would have, for example code / description / quantity.
How do I declare:
private static ArrayList<String> Produto = new ArrayList<>();
How do I add:
Produto.add(codigo + " | " + descricao + " | " + quantidade);
How do I read:
listaDados = Produto.stream().map((string) -> string + "\n").reduce(listaDados, String::concat);
How would this be in an object of type Product instead of String?