Java Notes-1
来源:互联网 发布:练习打字的最好软件 编辑:程序博客网 时间:2024/06/05 19:36
But Java continues to spread on a wide variety of platforms.
- Java source is compiled into a universal format—instructions for a virtual
machine.
-Compiled Java bytecode is executed by a Java runtime interpreter. The runtime system
performs all the normal activities of a hardware processor, but it does so in a safe, virtual
environment.
-The Java interpreter is relatively lightweight and small; it can be implemented in what‐
ever form is desirable for a particular platform.
-The fundamental unit of Java code is the class. As in other object-oriented languages,
classes are application components that hold executable code and data. Compiled Java
classes are distributed in a universal binary format that contains Java bytecode and other
class information
-In addition to the platform-specific runtime system, Java has a number of fundamental
classes that contain architecture-dependent methods. These native methods serve as the
gateway between the Java virtual machine and the real world.
-runtime system can further optimize their performance by compiling bytecode to native machine code
on the fly. This is called just-in-time (JIT) or dynamic compilation.
-Every object in Java has a well-defined type that is known at compile
time. This means the Java compiler can do the same kind of static type checking and
usage analysis as C++.
-However, Java is fully runtime-typed as well. The Java runtime system keeps track of all
objects and makes it possible to determine their types and relationships during execu‐
tion. This means you can inspect an object at runtime to determine what it is.
-you can write new code that
references binary class files without losing the type safety you gain from having the
source code.
-As long as a class maintains a
valid form of its original structure, it can evolve without breaking other classes that are
derived from it or that make use of it.
-Java eliminates ad hoc “pointers” that
can reference arbitrary areas of memory and adds object garbage collection and high-
level arrays to the language.
- Java runtime system keeps track
of all references to those objects. When an object is no longer in use, Java automatically
removes it from memory.
-Java uses a sophisticated garbage collector that runs in the background, which means
that most garbage collecting takes place during idle times, between I/O pauses, mouse
clicks, or keyboard hits. Advanced runtime system
- What Java provides are references—a safe kind of pointer. A refer‐
ence is a strongly typed handle for an object.
-pointers to methods can be accomplished more cleanly using interfaces and
adapter classes instead.
-When an exception occurs, it causes the flow of program execution to be transferred to
a predesignated “catch” block of code.
-Java supports
synchronization based on the monitor and condition model—a sort of lock and key
system for accessing resources.
-Over classes, Java provides packages, a layer of structure that
groups classes into functional units.
-In this little C++ drama, we have written some code that violates the encapsulation of
the Finances class and pulls out some secret information.
-The Java security model wraps three layers
of protection around imported classes
-The Java bytecode verifier is a fixed part of the Java runtime system
-Java’s first line of defense is the bytecode verifier. The verifier reads bytecode before it is
run and makes sure it is well behaved and obeys the basic rules of the Java language.
-Once code has been verified, it’s considered safe from certain inadvertent or malicious
errors.
-Java adds a second layer of security with a class loader. A class loader is responsible for
bringing the bytecode for Java classes into the interpreter.
-A
security manager is an object that can be installed by an application to restrict access to
system resources.
-The main() method is
the entry point for applications.
- Java Notes 1
- Java Notes-1
- Java Notes-1
- Java Notes (1)
- Java - Notes
- notes[java]
- java notes
- java notes
- Java Notes
- Java Notes
- Notes Of Thinking In Java (1)
- Java 游戏开发Notes
- Java Thread - Notes
- Java 游戏开发Notes
- Java-Notes Documents
- java 访问notes domino
- java 读取notes数据库
- Java Container Learning notes
- 原谅我对你的恨
- 模拟棋盘
- 软工总结
- 开源测试工具——功能测试工具
- poi的使用以及简单介绍
- Java Notes-1
- 软件工程阶段性总结(三)——软件设计和编码
- hdu 1027全排列
- 第十五周项目五:字符串操作(一)
- MFC通过脚本调用程序
- 快速排序的随机化版本代码
- Maven学习笔记——运行HelloWorld
- C++模板:实参演绎
- pat 1024 Palindromic Number