arraylist
How to access an attribute in an ArrayList in JAVA?
I have created an application that receives some data and gathers into a ArrayList of a class that is in another package. How ... e question: How do I take the values of a private attribute from another class and sum with another in the application class?
Working with vectors / matrices
Hello, I have the following doubt, I have 5 vectors
string[] Defesa = { "Gigante", "Golem", "Gigante Real" };
string[] Atk ... valor = vetor[0][1]; // Golem
I've tried with list, array, array.. And nothing works... I wonder if you have how.. And how?
Is it possible to pass a vector per parameter without instantiating it?
I wanted to pass a vetor (or a ArrayList) per parameter without instantiating it, but I'm pretty lost about that, because I u ... ;Role>();
roles.add(roleRepositoryJPA.findByRole("USER"));
Or
Role roles [] = {roleRepositoryJPA.findByRole("USER")};
Display only results that satisfy the condition within the loop
I am building a small algorithm that traverses a ArrayList and compares the found value with a value typed by the user.
But ... l be running until the last position, but since the iteration variable is local, I do not know how to do it outside the loop.
Delete copied array item without deleting the item from its source - VueJS
I would like to clone a list of numbers and be able to manipulate that cloned list without making change to the source, but i ... moverItem() {
this.listaClone.pop()
}
}
})
</script>
</body>
</html>
How to know if there is an element in a list index without giving error?
I am trying to give a get() in the indices of a ArrayList, so that if there is something in these positions, I add that value ... oura a lista
aColorCount = byColorCount.get(ar[x]);
byColorCount.add(ar[x], aColorCount++);
}
Scan an ArrayList of objects and check an attribute of an object passed as a parameter with one of the ArrayList [closed]
closed . This question needs details or to be clearer and is not currently accepting answers.
... f, the user is added without problems (I created a method to list them).
My question is, why the way I did is not working?
Index (get) comparison in Array List not working properly
I've been trying to compare a string (right answer) to an alternative of a question as an example in a project I'm developing ... }
EDIT: using break inside if in switch-case consisted the big problem of the code, this now neat and working with equals.
Verify that Java List has duplicate object attributes
I need help to create a logic that checks if certain attributes of an object, stored in a List<Object>, exist more than ... } else {
System.out.println("TESTE");
}
}
}
return listaAux;
}