java 虚拟机运行时数据区域 Runtime Data Areas
The Java virtual machine defines various runtime data areas that are used during execution of a program. Some of these data areas are created on Java virtual machine start-up and are destroyed only when the Java virtual machine exits. Other data areas are per thread. Per-thread data areas are created when a thread is created and destroyed when the thread exits.
虚拟机定义了各种运行时数据区以备程序运行时利用。一部份在虚拟机启动时被创建,在虚拟机退出时被销毁。另一部份跟线程有关,在线程创建时被创建,线程退出时被销毁。
3.5.1 The pc Register 寄存器
The Java virtual machine can support many threads of execution at once (§2.19). Each Java virtual machine thread has its own pc (program counter) register. At any point, each Java virtual machine thread is executing the code of a single method, the current method (§3.6) for that thread. If that method is not native, the pc register contains the address of the Java virtual machine instruction currently being executed. If the method currently being executed by the thread is native, the value of the Java virtual machine's pc register is undefined. The Java virtual machine's pc register is wide enough to hold a returnAddress or a native pointer on the specific platform.
虚拟机支持多线程,每一个线程都拥有自己的寄存器。在任一点,每个虚拟机线程都执行特定代码,当前方法。如果此方法不适本地的,
3.5.2 Java Virtual Machine Stacks 虚拟机栈
Each Java virtual machine thread has a private Java virtual machine stack, created at the same time as the thread.3 A Java virtual machine stack stores frames (§3.6). A Java virtual machine stack is analogous to the stack of a conventional language such as C: it holds local variables and partial results, and plays a part in method invocation and return. Because the Java virtual machine stack is never manipulated directly except to push and pop frames, frames may be heap allocated. The memory for a Java virtual machine stack does not need to be contiguous.
The Java virtual machine
相关文档:
java中的字符串也是一连串的字符。但是与许多其他的计算机语言将字符串作为字符数组处理不同,Java将字符串作为String类型对象来处理。将字符串作为内置的对象处理允许Java提供十分丰富的功能特性以方便处理字符串。下面是一些使用频率比较高的函数及其相关说明。
substring()
它有两种形式,第一种是:String substring ......
一个Java接口(Interface)是一些方法特征的集合,这些方法特征当然来自于具体的方法,但是它们一般都来自于系统中不断出现的方法。一个接口只有方法的特征,而没有方法的实现,因此这些方法在不同的地方被实现时,可以有完全不同的行为。在Java语言的,Java接口还可以定义Public常量。 ......
Ribbon 原来出现在 Microsoft Office 2007 的 Word、Excel 和 Powerpoint 組件中,后来也被运用到 Windows 7 的一些附加组件等其它软件中,如画图和写字板。它是一个收藏了命令按钮和图标的面板。它把命令组织成一组"标签",每一组包含了相关的命令。每一个应用程序都有一个不同的标签组,展示了程序所提供 ......
选择题
3阅读一下程序:
Boolean a=false;
Boolean b=true;
Boolean c=(a&b)&&(!b);
Int result=b==false?1:2;
这段程序执行完后,c与result的值是(D)。
A c=false; result=1; B. c=true;result=2;
C.c=true;result=1 D. c=false; result=2
6.下述声明中哪种可防 ......
JDK版本:jdk1.6.0_17
a. 下载安装包jdk-6u17-linux-i586-rpm.bin
b. cp jdk-6u17-linux-i586-rpm.bin /usr/local/
c. chmod a+x jdk-6u17-linux-i586-rpm.bin
d. sh jdk-6u17-linux-i586-rpm.bin 接受协议yes,安装完成
e. 设置环境变量
vi /etc/profile
加入下面内容:
#set java environment
JAVA_HOME=/ ......