Java Primitive
来源:互联网 发布:mysql character set 编辑:程序博客网 时间:2024/05/02 06:44
Java Primitive
As of the Java Virtual Machine Specification second edition, numeric types, the boolean type (§3.3.4), and the returnAddress type are the three java primitive types supported by JVM.
Most of you may get annoyed, we all know about the primitives of java. That is where from we all started it.
But, you may not be aware of a primitive called returnAddress. Surprise isn’t it?
This post serves just to bring that primitive to your notice. It is not part of the language construct / api and is not of direct use to an application programmer.
But it is good to be aware of the primitive for the sake of completeness.
1) Numeric Types
Numeric types are classified as integral primitive and floating point type primitives
Integral type primitive:
byte – 8-bit signed two’s complement integers: -128 to 127 (-2power7 to 2power7 – 1)
short – 16-bit signed two’s complement integers: -32768 to 32767 (-2power15 to 2power15 – 1)
int – 32-bit signed two’s complement integers
long – 64-bit signed two’s complement integers
char – 16-bit unsigned integers representing Unicode characters (§2.1)
Value ranges from -2power(N-1) to 2power(N-1) – 1 ; where N is the bit size like 8 or 16,…
In the above, two’s complement means, a negative number will be denoted by the two’s complent of its absolute value.
Most significat digit (MSB) will denote if the number is positive or negative. MSB will be 0 if the number is positive and 1 if it is negative.
Floating-point primitives are float and double
- positive and negative sign-magnitude numbers
- positive and negative zeros
- positive and negative infinities
- a special Not-a-Number value (used to represent zero/zero kind of numbers).
2) boolean type primitive
encode the truth values true and false. Even booleans are in turn processed using int instructions.
3) returnAddress type primitive
returnAddress types are pointers to the opcodes of JVM instructions like jsr, ret, and jsr_w
- Java Primitive
- java primitive 数据类型长度
- [Java] Primitive 类型
- [Java] Primitive(原始) 类型
- Java Thread Primitive Deprecation
- java基础primitive 类型
- Java sort 源码解析 primitive part
- java 关于primitive数组 内存问题
- Java的原始类型(Primitive Type)
- Thinking in java (2)----primitive types
- java的primitive主数据类型和引用
- Java的原始类型(Primitive Type)
- JAVA 基本类型 primitive主数据类型的包装类型
- java——reference类型和Primitive类型
- Java的数据类型分为两类:primitive和reference类型
- Java SE 第二讲(原生数据类型 Primitive Data Type)
- Java自学总结之一primitive与对象引用变量
- Java的8种基本数据类型(primitive type)
- Java开发中的23种设计模式详解
- c++ socket 数据传输总结
- C++算法之最短路径
- 2016年乐山师范学院程序设计大赛解题报告
- Android核心基础(ListView)
- Java Primitive
- YZOJ 1572 [省队训练]calc
- FZU - 1928 硬币翻转游戏(2维nim游戏)
- 【2016年12月2日】百度网盘 IDM下载插件完美图文教程 完美解决开发者警告问题
- Java GUI编程设计
- Unity+ Photon服务器实时对战游戏——Photon服务器介绍(二)
- malloc实现原理
- 【Java笔试题】将一个数插入到已经排好的数组之中
- 超级烧脑的问题解决了,真高兴啊!哈哈哈