Without addressing each occasion, in general, Scala is happy to create many objects, both small and large, to make your life easier. If you specifically plan to have a small amount of memory, then Scala may be slightly less compact than Java. Otherwise, if you try to make the program quick and easy to encode (but you do not pay much attention to memory), it will be more.
If someone wants to create versions of programs with a small amount of memory and send them, I am sure that they will be accepted.
source share