Posts by Alex de Moraes • 60 points
9 posts
-
0
votes2
answers115
viewsA: How to send a formatted Zoneddatetime in JSON?
I assume you’re using a project with dependencies managed by Maven. Include dependency Jackson-datatype-jsr310: <dependency> <groupId>com.fasterxml.jackson.datatype</groupId>…
-
2
votes2
answers97
viewsA: Match pointers in C
I’ll assume you already know the ratings: &variable : memory address of variable *pointer : value contained in memory address pointed by pointer The function scanf expects from the second…
-
0
votes2
answers221
viewsA: JAVA - How to compare columns of an int[][] array
If you give up using the utility method Arrays.equals(), can implement the method comparedColumns comparing the elements of each column one by one: public static void compararColunas(int[][] matriz,…
-
0
votes2
answers65
viewsA: Correct unbalanced parentheses
Your question is not entirely clear. In any situation is it necessary to reorder the characters or just include new ones? In case you don’t have to reorder the characters but only know how many…
-
0
votes1
answer30
viewsA: I am trying to move a file that is inside an Array using renameTo
There is a good chance that there is a file conflict with the same name in the destination folder, so the method returns false.
-
1
votes2
answers200
viewsA: Eliminate consecutive duplicate string letters
A slightly different approach would be to remove the repeated characters instead of concatenating the distinct characters. As the class String does not have a method to remove a character, the way…
-
1
votes1
answer70
viewsA: Algorithm performance in JAVA
I didn’t get to import your code in my editor to debug but there may be two problems: the performance may be bad or you may have an infinite loop. List or Set insertion and search operations are…
-
0
votes1
answer27
viewsA: How to do @Autowired on a List<Meucomponente>?
The only solution I could think of to this problem was to create a "qualified" Bean for the Crawlers list: @Configuration public class CrawlerList { @Autowired ApplicationContext context;…
-
0
votes3
answers65
viewsA: Eternal and unique value
As also detailed in this other reply, extend() expects as a parameter an iterable object (for example another list) and not a primitive (as an int). Note that when you use the append method you have…