Why each slot of the local variable array in a stack frame is of 4 bytes, and not 1 byte in the JVM?
问题 Each slot of local variable array is of 4-bytes. So to store a character, short or byte variables one slot is used. Means all smaller data-types internally gets converted into int data type. My doubt is: 1). Is it not making smaller data types useless, if internally they are of 4-bytes?, If yes, Why not remove such data-types from the language? 2). If each slot is of 1-byte then there will be no wastage of memory. Why not each slot is of 1-byte? 回答1: 1). Is it not making smaller data types