Recently encountered a problem with egg pain. In the external input data, the text gets to the data, and then stored in an array object inside. I use the array to do the loop judgment. Each time the next one comes in, it loops through the array before it, to see if it has the same value. But sometimes it can be compared for the first time. However, after 3 elements have been added. To scan the value of the first one. The first value will appear, or it can be added to the array. This question is confusing to me. Because the previous cycle was judged. = = This is a direct comparison for -128---127. In general, we operate more complex data types with equals. The problem that arises is quite puzzling. Preliminary estimates are not compared when compared to equals.
About equals in Java comparison worthwhile methods and = = and problems encountered in actual projects