Co-Authored By:

##### Asked by: Kayce Garitagoitia

technology and computing programming languages# What is long max value in Java?

**Long**is last primitive type related to int, it is stored in 64 bits of memory, which means it can store more

**values**than integer, stores

**values**from (-2

^{63}) to (2

^{63}-1). So the

**Java long max values**are -9,223,372,036,854,775,807 and 9,223,372,036,854,775,808.

Accordingly, what is long max value?

**long**: The **long** data type is a 64-bit signed two's complement integer. It has a minimum **value** of -9,223,372,036,854,775,808 and a **maximum value** of 9,223,372,036,854,775,807 (inclusive). Use this data type when you need a range of **values** wider than those provided by int.

**Integer**.

**MAX_VALUE is**the largest value and

**Integer**.

**MIN_VALUE**the smallest that an int primitive can contain. : Wrapper classes « Utility Classes « SCJP. Utility Classes.

Beside above, what is the max value of float in Java?

This is possible to do because a **float value** can hold only a **maximum** of 7 digits after the decimal, while a double **value** in **Java** can hold a **maximum** of 16 digits after the decimal. So, for example, you can say: **float** f = 0.25f; double h = double(f);

**Long**. **Long** is a **data type** used in programming languages, such as Java, C++, and C#. A constant or **variable** defined as **long** can store a single 64-bit signed integer. Because the **long data type** is signed, the possible integers range from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807, including 0.