Junior — Middle
What amount of memory is required to store data of type int in your programming environment?
sobes.tech AI
Answer from AI
In Java, the data type int occupies 4 bytes (32 bits) of memory. It represents a signed integer, with a value range from -2,147,483,648 to 2,147,483,647.
Example usage:
int number = 100;
System.out.println("Size of int in bytes: " + Integer.BYTES); // Will output 4