Java will use as much memory as you give it. Higher heap size is better for performance up to around 32GB. For most Java apps you can limit heap to 256M or less with little consequence.
AFAIK Java uses less ram than Python and JavaScript, only common languages that beat it are Golang and C/C++
AFAIK Java uses less ram than Python and JavaScript, only common languages that beat it are Golang and C/C++