Read the source code, it will make you learn a lot
1. Let you know how others implement a common function
2. Let you know how others organize your code structure
In general, open source code has a lot of excellent design and function of the implementation of methods and ideas can be borrowed;
Read the source, can feel the various magical objects and methods are intertwined, to form a large or interesting function,
It is very important for me to make a reference for my own development.
Note: The first time is generally to understand the code flow, especially the main process, the correct process;
And then analyze how the exception process is handled.
Then several times to continue to study the implementation of the logic and details, such as the design of the method, the design of the class and so on;
It is recommended to read the source of Lucene (simply write a demo to practical it, and then read its source code, to find out what you want to know);
Read the source code, it will make you learn a lot