Java - Number

Java Conceptuel Diagram


Number, Numeric, Quantity in Java.

The abstract class Number is the superclass of platform classes representing numeric values that are convertible to the primitive types byte, double, float, int, long, and short.


Floating point

Number - Floating-point (system|notation) - (Float|Double) - Approximate numeric

The literal n.n is interpreted as a double.

double = 3.6


Java - Integer

Fixed point

fixed point number (ie exact calculation) in java is implemented with the BigDecimal data type

  • Bigger than and bigger or equal
value.compareTo(BigDecimal.valueOf(10)) > 0
value.compareTo(BigDecimal.valueOf(10)) >= 0
  • Less Than and less than or equal
value.compareTo(BigDecimal.valueOf(10)) < 0
value.compareTo(BigDecimal.valueOf(10)) <= 0

Documentation / Reference

Discover More
Java Conceptuel Diagram
Java - (Data Type|Type)

data type in the java world. The Java programming language is statically-typed, which means that all variables must first be declared before they can be used. The language supports four kinds...
Java Conceptuel Diagram
Java - Double

Double in Java They implements the 64-bit precision IEEE 754 floating point Documentation: java/lang/Double Double is a subtype of number. Literal Double.parseDouble always uses a dot...
Java Conceptuel Diagram
Java - Integer

integer data type in Java. int (or Integer) is the 32 bit implementation of an integer. Java can also store an integer on 64 bit with a long. An integer in java is a sub-class of number They are...
Java Conceptuel Diagram
Java - Variable Memory Size

memory size of a variable. To get the memory size of a variable, you can do it: statically with the data type declaration dynamically with the Java runtime. See A single alphanumeric character...

Share this page:
Follow us:
Task Runner