Studying Java 9, I saw a new method that works with collections: List.of , example:
List<String> frutas = List.of("maça", "laranja");
I already used Arrays.asList , for example:
List<String> frutas = Arrays.asList(...
Is it possible to make a OrderBy in a List<> setting the value for comparison?
Example:
mRel.OrderBy(s => s.Status == EnumModel.StatusGeral.Novo).ToList()
My Code:
List<MotivosModel.MotivosRel> mRel = Carre...
I have a problem that I have to perform memory sorting on a large number of items and would like to know which algorithm .NET uses to sort when we call the Sort() method of a list, for example.
I need to know because I realized that my...
In java it is possible to create and manipulate list of any data type using List<E> , see the example below:
List<String> lista = new ArrayList<>();
lista.add("Stack");
lista.add("Over");
lista.add("flow");
I created...
I have a class that has an attribute of type Set, because I want repeated values to be ignored, however I need to return this in List form to fill in a ListView , so what is the best way to implement this feature?
Reader.java
packag...
What is the purpose of the => operator in the use of List<T> lists, I'm starting to use generic lists and I came across this operator, it is only used in this method LISTA.ForEach(i => Console.WriteLine(i)); ?
Below...
I have an example program that adds objects of the type of my class Pessoa to a JTable and also to ArrayList<T> , this program has three basic functionalities which are as follows:
Add
Change
Delete
See the pr...
In PHP, to get the last element of an array I can do this:
$array = array(1, 2, 3);
echo end($array); // 3;
What about Python? How could I do this with this list:
arr = [1, 2, 3]
I have list with the following values:
numeros = [5, 3, 1, 2, 3, 4, 5, 5, 5]
In Python would have some function to count how many times some value repeats?
For example: I want to know how many times 5 has repeated.