Earlier quoted context omitted.
But that is exactly what you do when going after performance in game development, even in C and C++, and it isn't less ugly by using those languages instead of Java. There is an EA available for Valhalla and there is now the roadmap to incrementally bring such features into the platform. Java 14 has a new native memory support as experimental and it might reach stable already by 15. https://jdk.java.net/valhalla/ htt…
In C and C++ you don't need to make int-arrays. You can group data that is accessed together in structs and keep arrays of these structs. With regards to performance, there must be some fine art in splitting structs into smaller structs, and keep them as parallel arrays, but there is also a limit to it. At some point you will need too many pointers to point at the same position in all these arrays. I've never cared t…
Naturally at some level you will have a class full of native methods as FFI to OS APIs or libraries written in C or C++.
From that point of view, I consider Java still a better option as game engine scripting language as Python/Lua/JavaScript, because you get strong typing, there is still dynamic loading, a good set of AOT/JIT/GC infrastructure and more control over memory layout than those languages allow for.
Naturally that is a matter of personal taste.