Jvm:
-----------------
1.jvm:java virtual machine.
2.class file
*.class
3.ClassLoader
4.runtime Data area
The run-time data area.
1.Method Area: Method zone. (shared)
Shared for all threads.
2.heap (Shared):
Shared for all threads.
3.java stack (stack area)
Exclusive.
4.native method Stack (local methods stack)
Exclusive
5.Program Counter Register
Program counter.
5.execute engine
Execution engine.
6.native interface
Local interface
7.native Libraries
Local class Library
Jvisualvm
--------------
1. Using the JVISUALVM tool that comes with the JDK
${java_home}/bin/jvisualvm.exe software.
2. Writing procedures
Class.forName ("xx.xx.xxx.Xxxx");
Class.forName ("Xx.xx.xxx.Xxxx", False,xxx.class.getclassloader ());
Java Reflection
--------------
Dynamically accesses the properties and methods of an object.
1.java.lang.reflect
2.java.lang.class: Class class, Class descriptor, describes the appearance.
3.java.lang.reflect.method
A method descriptor that describes the characteristics of a method.
4.java.lang.reflect.field
field that describes the characteristics of the field.
5.java.lang.reflect.constructor
Constructors
6.java.lang.reflect.modifier
Modifier.
Class Cat{private string color;p rivate string name;//...get/setxxxprivate Cat (String color,string name) {//this.xxx ...} public void Catchmouse () {System.out.println ("xxxx");}}
1. Create a Cat object by reflection mode.
2. The reflection method calls the Catchmouse () method.
3. The reflection mode is assigned a value of name and color.
"DAY23" JVM with reflective learning notes