Solutions to some problems I encountered recently
- Summary of SpringBoot front-end and back-end separation parameter transfer methods
- Explanation of Java8 version features
- idea uses git to update code: update project
- removeAll causes java.lang.UnsupportedOperationException exception
- Java's split() function splits with multiple different symbols
- @Aspect annotation
- The aspect demo extracts public components and uses the aop aspect method to implement flow log output. The code is non-intrusive and meets the opening and closing principle! Used strategy pattern
- 8 ways to implement asynchronous programming in Java
August 06, 2023
Why does SELECT * FROM tableName GROUP BY columnName report a syntax error?
August 09, 2023
In Java, when you use List
a foreach
loop to iterate over elements, and the structure is modified within the loop body List
(such as adding or removing elements), it will cause ConcurrentModificationException
an exception because foreach
the loop is used Iterator
before the next iteration , will check List
whether the structure has changed.
Therefore, when using List
a foreach
loop, if List
the structure is modified in the loop body, an exception will occur ConcurrentModificationException
. To avoid this problem, consider using ListIterator
or using a normal for
loop to iterate over the list.