
Thinking in java4(五)
文章平均质量分 76
monica888888
这个作者很懒,什么都没留下…
展开
-
Arrays and generics 数组和通用
一般类:1、建立一个类:Test 2、 使用这个类:Test[] t=new Test[10]原创 2017-05-23 06:58:54 · 343 阅读 · 0 评论 -
An (int, float,long,double,String) literal value
literal:In computer science, a literal is a notation for representing a fixed value in source code 在源码中,表示一个固定值。文章:https://en.wikipedia.org/wiki/Literal_(computer原创 2017-05-15 20:49:15 · 401 阅读 · 0 评论 -
java字节码指令列表
Main article: Java bytecodeThis is a list of the instructions that make up the Java bytecode, an abstract machine language that is ultimately executed by the Java virtual machine. The Java byt转载 2017-05-16 15:42:32 · 660 阅读 · 0 评论 -
jvm Local Variables ,Operand Stacks
我们源码的方法需要保存的数据: 1》方法参数 2》 程序里的变量 3》程序里的 literal value: 4》编译时常量 2》两个数或更多的数(算术,逻辑,位)运算时:如 1+5=6 这些数和计算结果需要保存,原创 2017-05-17 10:06:56 · 450 阅读 · 0 评论 -
jvm stack 个数
文章来源 https://www.yqfy.net/texts/bin/ 1、stack=1,只有一个返回值 int 0public class ret{public static int main(String[] args){return 0;}javap -c -verbose ret.classpublic static int main(java转载 2017-05-17 15:52:09 · 643 阅读 · 0 评论 -
指令invokespecial
The two types of compiler-generated methods that may appear in class files are instanceinitialization methods (named 实例变量默认调用的方法: 类变量默认调用方法:参考文章:1、jvm 说明书(The Java®原创 2017-05-17 19:14:56 · 614 阅读 · 0 评论 -
the object's instance variables initlization 对象变量
The primary data that must in some way be represented for each object is the instance variables declared in the objectís class and all its superclasses. 实例变量:用来保存对象的重要数据。哪么它是什么时候进行初始化呢?原创 2017-05-18 16:06:31 · 404 阅读 · 0 评论 -
Generics 通用型 a stack class
1、我们自己写一个 stack :先进后出,像往货车上放(取)东西一样。 一、对象是一辆车:LinkedStack ,编译后LinkedStack.class 1>放东西 push 方法 2>取东西 pop 方法 3>放的内容:,表示通用,什么都可以放。 4>Lin原创 2017-05-16 15:07:51 · 334 阅读 · 0 评论 -
a string intern pool,new string 存贮
一、实现方法1、自动: 1、An String literal value 自动成为a string intern pool的一员。 2、all compile-time constant strings 2、需自己调用方法: String s=hello;s.intern();原创 2017-05-16 07:14:03 · 375 阅读 · 0 评论