Scala's String maps to Java's String. So reference will be in heap.
Scala's int, float maps to Java's Integer or primitive int. When does it refer to wrapper class and primitive types?
If it is wrapper class, will ref be at heap? If it is primitive, will ref be at stack?
How does that switch happen for a single variable? I read that scala uses both for optimization.