Java int type

Introduction

Java int type is a signed 32-bit type that has a range from -2,147,483,648 to 2,147,483,647.

We can use int type to control loops and to index arrays.

When byte and short values are used in an expression, they are promoted to int when the expression is evaluated.

int is often the best choice when an integer is needed.




PreviousNext

Related