Size of int in Java is

Size of int in Java is Correct Answer 32 bit

The size of an int in Java is 32 bits.

Here's the breakdown:

Option A: 16 bit - This is not correct. The int data type in Java is 32 bits in size, not 16 bits.

Option B: 32 bit - This is the correct size of an int in Java. An int occupies 32 bits of memory in Java, allowing it to represent a wide range of whole numbers.

Option C: 64 bit - This size is not correct for an int in Java. A 64-bit data type is larger and typically used for long integers.

Option D: Depends on execution environment - The size of an int in Java is standardized and is always 32 bits regardless of the execution environment. It is not dependent on the platform or execution environment.

So, the correct size of an int in Java is 32 bits.

Related Questions

Comment on the following 2 C programs.
#include  //Program 1int main(){ int a; int b; int c;}#include  //Program 2int main(){ int a; { int b; } { int c; }}