3 - [JVM - Dynamic bytecode technology]

1 byte code technology application scenario AOP Technology Lombok de duplication plug-in Dynamically modify class files, etc 2-byte technology advantage Java bytecode enhancement refers to modifying and enhancing the function of Java bytecode after it is generated, which is equivalent to modifyi ...

Posted by seanpaulcail on Sun, 01 Mar 2020 04:31:51 -0800

Talk about class loading process, class loading mechanism and custom class loader in detail

I. Introduction When a program uses a class, if the class has not been loaded into memory, the JVM will load the class through three steps: loading, linking, and initializing. 2, Class loading, linking, initialization 1, loading Class loading refers to reading class files into memory and creating ...

Posted by rachwilbraham on Fri, 28 Feb 2020 04:47:26 -0800

Multithreading: thread creation and thread safety

Article directory Program, process, thread Create thread Startup thread Thread safety To solve the problem of thread safety (to realize Runnable) -- synchronous code block To solve the problem of thread safety (to realize Runnable) -- synchronization method To solve the Thread safety problem (inhe ...

Posted by surreal5335 on Wed, 26 Feb 2020 20:25:07 -0800

Java basic programming structure

Sketch Java originated from Oak, a development language developed by Sun company for set-top box, which was renamed "Java" because of its name. Java is an object-oriented development language. Its characteristic is "compile once, run everywhere". This implementation depends on JVM. Basic design of Java program A basic Java ...

Posted by eelmitchell on Sat, 22 Feb 2020 03:13:30 -0800

Java object oriented

Java objects are instances of the Object class, so you can directly call the methods defined in the class toString() class Person { private String name; public Person(String name) { this.name = name; } } public class PrintObject { public static void main(String[] args) { ...

Posted by Nicholas Reed on Fri, 21 Feb 2020 05:11:18 -0800

Exception mechanism (exception classification and handling, getMessage,printStackTrace)

(all screenshots in the figure, as well as data notes, come from the power node, for self-study and use) 1. What is the exception? First, abnormal simulation is "abnormal" events in the real world Second, in java, exceptions are simulated by means of "classes" Exception description u ...

Posted by lixid on Fri, 21 Feb 2020 02:58:19 -0800

How do I use stacktrace or reflection to find the caller of a method?

I need to find a caller for a method.Can stacktrace or reflection be used? #1st floor This is part of the code that I wrote based on the tips shown in this topic.Hope to help you. (Please let me know if you have any suggestions to improve this code) Counter: public class InstanceCount{ private static Map<Integer, CounterIn ...

Posted by redking on Thu, 20 Feb 2020 18:09:37 -0800

Reflection mechanism and Demo in java

I. reflection Reflection mechanism is the most commonly used in java development. For example, reflection mechanism is used in all three frameworks. JAVA reflection mechanism is in the running state. For any class, you can know all the properties and methods of this class. For any object, you can ca ...

Posted by mmoussa on Tue, 18 Feb 2020 21:36:16 -0800

Flink1.9“Error: A JNI error has occurred”

background Recently, companies are building big data systems, and architects recommend using Flink to build them.So this day, I'm investigating Flink in my own virtual machine environment (Ubuntu 16.4). from ververica I learned the fundamentals of flink in school, because I worked on python data pr ...

Posted by aperales10 on Sun, 16 Feb 2020 18:33:05 -0800

HashSet and list performance

Obviously, the search performance of the general HashSet < T > class is higher than that of the general list < T > class. Just compare the hash based key with the linear method in the list < T > class. However, it may take some CPU cycles to calculate the hash key itself, so for a small number of items, linear search can r ...

Posted by Cagez on Sat, 15 Feb 2020 02:03:50 -0800