Skip to Content
Introduction to Java
Data Types I: int

Great job! You’ve already learned how to print text.

Creating more useful Java programs will likely require you to work with several additional types of data. Let’s explore a few of them.

The first data type we will use is int.

  1. int is short for integer, which are all positive and negative numbers, including zero. This number could represent the number of visits a website has received or the number of programming languages you know.
  2. The int data type only allows values between -2,147,483,648 and 2,147,483,647.



Type any whole number in between the parentheses of System.out.println();

int data types do not need to be typed within quotes, so you can avoid using quotes this time.

Folder Icon

Take this course for free

Already have an account?