Posts by Vitor • 11 points
2 posts
-
0
votes3
answers412
viewsQ: How do I create an Arraylist of objects with each position containing a new object?
public class Produto { String marca; int quant; Produto prod = new Produto(); ArrayList <Produto> lista_de_produtos = new ArrayList<>(); lista_de_produtos.add(new Produto()); //É dessa…
-
1
votes1
answer86
viewsQ: How does this function work?
It’s part of an sorting algorithm, reading the code made it seem to me that the function never makes the call: sort(mid+1, high); gets into loop at first sort(low, mid); until you leave the if, and…