0
How exactly is primitive type stored in java?
Reference type store memory address of actual object and that's clear. but when I say "int x = 5;" , how does x store 5 in stack memory?
2 Antworten
+ 3
It depends. Normally, in the stack, but if it is a property of an object then it will be stored in the heap.