Jump to content

Java Programming/Keywords/int

From Wikibooks, open books for an open world

This is the current revision of this page, as edited by Strange quark (discuss | contribs) at 18:33, 4 July 2017 (Fix categorization). The present address (URL) is a permanent link to this version.

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

int is a keyword which designates the 32 bit signed integer primitive type.

The java.lang.Integer class is the nominal wrapper class when you need to store an int value but an object reference is required.

Syntax:

int <variable-name> = <integer-value>;

For example:

Computer code
int i = 65;


See also: