Numeric Values Representation in Java: Difference between revisions
Jump to navigation
Jump to search
Line 3: | Line 3: | ||
* [[Java#Numeric_Values_Representation_in_Java|Java]] | * [[Java#Numeric_Values_Representation_in_Java|Java]] | ||
* [[Java_Language#Primitive_Types|Java Language - Primitive Types]] | * [[Java_Language#Primitive_Types|Java Language - Primitive Types]] | ||
* [[Two's Complement Representation]] | |||
=Overview= | =Overview= |
Revision as of 23:36, 5 April 2020
Internal
Overview
Primitive Types
Integral Primitive Type
An integral data type is a data type whose values are integers. There are five integral primitive types in Java: byte, short, int, long and char. Of those, the first four (byte
, short
, int
and long
) are signed, and char
is unsigned.
byte
is the smallest integral data type available in Java. Its values used one-byte (8 bites) and they are represented in two's complement.
Floating Point Primitive Type
Literals
There are no byte
literals, but any int
literal that falls within the range of a byte can be assigned to a byte variable.
TODO
- Primitive Types
- Wrapper Types, auto-boxing.
- Number https://www.geeksforgeeks.org/java-lang-number-class-java/
- BigInt
- https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html
- https://docs.oracle.com/javase/tutorial/java/data/numberclasses.html
- https://www.inf.unibz.it/~calvanese/teaching/06-07-ip/lecture-notes/uni04.pdf
- https://www.ntu.edu.sg/home/ehchua/programming/java/datarepresentation.html