About 2,140,000 results
Open links in new tab
  1. Java Data Types - GeeksforGeeks

    Apr 7, 2025 · Remember: In Java SE 8 and later, we can use the int data type to represent an unsigned 32-bit integer, which has a value in the range [0, 2 32 -1]. Use the Integer class to …

  2. Java Data Types - W3Schools

    Data types are divided into two groups: Primitive data types - includes byte, short, int, long, float, double, boolean and char; Non-primitive data types - such as String, Arrays and Classes (you …

  3. Java Primitive Datatypes and Ranges (with Examples)

    May 24, 2023 · Learn about all eight primitive data types in Java, their memory sizes, default values, and the maximum and minimum values range. 1. Java Primitive Types. Primitive data …

  4. types - What is the inclusive range of float and double in Java ...

    Jun 5, 2012 · Java's Double class has members containing the Min and Max value for the type. 2^-1074 <= x <= (2-2^-52)·2^1023 // where x is the double. Check out the Min_VALUE and …

  5. java - How to calculate the range of primitive data types

    Formula to calculate range in Java-2 (n-1) to +2 (n-1)-1 Where n is the number of bit (1 byte= 8 bit) So, for byte type range would be: -2 (8-1) to +2 (8-1)-1 or, -2 (7) to +2 (7)-1 or, -128 to +127

  6. Primitive Data Types (The Java™ Tutorials - Oracle

    In Java SE 8 and later, you can use the long data type to represent an unsigned 64-bit long, which has a minimum value of 0 and a maximum value of 2 64 -1. Use this data type when …

  7. Java Primitive Data Types. Size, Range and Default Value of Basic Data

    This tutorial explains basic primitive data types (int, long, short, byte, char, boolean, float, double) with their size, range and default value. Java basic data types are predefined and implicit to …

  8. Java Primitive Data Types - Online Tutorials Library

    Java data types define the type and value range of the data for the different types of variables, constants, method parameters, return types, etc. The data type tells the compiler about the …

  9. integer - The range of int in Java - Stack Overflow

    I understand that the int range in Java should be -2^31 to 2^31-1. But when I run this code snippet with 20: public int factorial(int n) { int fac=1; for (int i=1; i<=n; i++) { fac *= i; …

  10. Data Types Java - Primetive and Non-Primetive (with Example)

    Java defines four integer types: byte, short, int, and long. All of these are signed, positive and negative values. Java does not support unsigned, positive-only integers. Let’s look at each …

Refresh