What is a simple framework in Java

Perhaps you are curious about how the framework works? Here the idea of ​​the framework is illustrated using a simple framework example.
Framework goal
Why do we first need a different framework than ordinary libraries? The aim of the framework is to define a process so that developers can implement certain functions according to individual requirements. In other words, the framework defines the framework and the developer fills out the framework when using the framework.
The simplest framework
The following example defines the first three classes as part of the framework and the fourth class is the framework's client code.
Main.java is the entry point of the framework. This cannot be changed.
// // This is the entry point of the framework and cannot be changed. public class Main {
public static void main (String [] args) {
Human h = new Human (new Walk ()) ;
H。doMove ();
} }
Move.java is a hook. In hooks, developers can define / extend functions according to their requirements.
public abstract class Move {
public abstract void action ();}
Human.java is a template that reflects the working principle of the framework.
public class human {
private move move;

This simple framework enables and requires developers to extend the Move class. In this simple framework, the action () method is the only thing that developers can change.
Different "actions" can be programmed for different purposes within the implementation. For example, the following example prints "5 miles per hour". You can of course redefine it as "50 mph".
public class Walk extends Move {

The examples here just show how simple templates and hooks work. The real framework is much more complicated. Not only does it contain other relationships such as template-template relationships, but also very complex procedures for effectively improving performance and programmability.
After so many years of development, I finally rounded up a number of materials and interview questions for learning Java. If you want to get yourself better in the technology you can follow me, send and receive information via private message, or leave your contact information in the comments section when you have the time, just remember to click forward for me so people can see.