I personally would never compare the two. Someone said: java to JavaScript is like car to carpet. And I completely agree with that.
"std::allocator is to allocation what std::vector is to vexation".
There was another transparency inside:
"std::allocator is to allocation what alligator is to allegation".
You mean the sibling who commented five minutes before you?
https://www.keycdn.com/support/difference-between-java-and-j...