I am stuck at exercise2


how do i deal with int

public class DataTypes {
	public static void main(String[] args) {





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

what is int?

  • int is short for integer, which are all positive and negative numbers, including zero.

  • The int data type only allows values between -2,147,483,648 and 2,147,483,647.

so you can write any value from -2,147,483,648 to 2,147,483,647 inside the parentheses of System.out.println(); like





even when i put a valid int within the parenthesis it still displays an error


You should post your code with the valid int so we can review it.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.