Java
Posts tagged with Java.
09 Jul 2026
Em 1989 eu treinava karatê Shotokan na Academia Meikyo, na QI 7 do Guará I, em Brasília.
Eu tinha 10 anos.
Não lembro mais o nome do professor. Também não lembro o nome da professora, uma mulher negra, talentosa pra caramba, com um kimono tão branco que parecia brilhar. Isso me incomoda até hoje. Tem gente que passa pela nossa vida por pouco tempo e deixa uma imagem tão forte que continua existindo dentro da gente décadas depois.
09 Jul 2026
In 1989 I trained Shotokan karate at Academia Meikyo, in QI 7 of Guará I, in Brasília.
I was 10 years old.
I no longer remember the teacher’s name. I don’t remember the name of the other instructor either, a Black woman, incredibly talented, wearing a gi so white it seemed to glow. That still bothers me today. Some people pass through our lives for a short time and leave an image so strong that it keeps existing inside us decades later.
03 Nov 2024
In Java, choosing between Stream() and ForEach() depends on what you want to do with your data. While both are used to iterate over collections, each has its own strengths.
stream()
Using stream() is powerful for complex data transformations, allowing operations like filtering, mapping, and reducing. It’s ideal for:
- Transformations and filters: Use Stream() to apply operations like filtering, mapping, grouping, or reducing data.
- Chained processing: Apply multiple operations in a single chain.
- Parallel processing: For large datasets, use parallelStream() to leverage multi-core processors.
- Immutability: Streams avoid side effects, allowing new collections to be generated without changing the original.
Example:
List<String> names = Arrays.asList("Maria", "José", "João");
List<String> filteredNames = names.stream()
.filter(name -> name.startsWith("J"))
.map(String::toUpperCase)
.collect(Collectors.toList());
The results will be a new list only with the names started with J in uppercase.
11 Oct 2015
Apesar de existirem muitas críticas à linguagem Java, é um fato que a JVM (Java Virtual Machine) é uma obra-prima.
Muitas pessoas confundem a Java Virtual Machine com a linguagem Java e tratam tudo como se fosse uma coisa só, esse é o
tipo de ignorância que infelizmente é muito difundida por aí. Uma coisa é a linguagem Java ter suas deficiências (como
qualquer outra linguagem tem) e receber críticas por isso e outra coisa é a plataforma e ecossistema Java.