All of the new features in the new Java 17 SDK get me excited, but the "Vector" really gets me confused:
Based on the official docs, the Vector is to target the CPU intensive computation (e.g. hard-core Math calculation), and this can be used for developing applications such as ML algorithms
The term "Vector" triggered a thing in my mind, which is the class in the Util module, and it is like "ArrayList", but thread-safe. I casually use this in my code when dealing with concurrency situations.
Now, I'm confused. when talking about the "Vector" in the latest Java 17, these two "Vector" are the same thing? or totally different?
java 17 feature Vector Vs. Java Util Vector, same or different?
They are different APIs. Java vector API was released with Java 16. Check JEP 338: Vector API (Incubator) to learn more about Java vector API. With Java 17, the vector API has been enhanced for performance and implementation. One of the enhancements is to translate byte vectors to and from boolean arrays.