Solutions to some problems I encountered recently

Solutions to some problems I encountered recently

August 06, 2023

Why does SELECT * FROM tableName GROUP BY columnName report a syntax error?

August 09, 2023

In Java, when you use Lista foreachloop to iterate over elements, and the structure is modified within the loop body List(such as adding or removing elements), it will cause ConcurrentModificationExceptionan exception because foreachthe loop is used Iteratorbefore the next iteration , will check Listwhether the structure has changed.

Therefore, when using Lista foreachloop, if Listthe structure is modified in the loop body, an exception will occur ConcurrentModificationException. To avoid this problem, consider using ListIteratoror using a normal forloop to iterate over the list.

Guess you like

Origin blog.csdn.net/Blue_Pepsi_Cola/article/details/131998216