I was reading through Java-The Complete Reference,and then I encountered this statement which says that- Methods declared as final can sometimes provide a performance enhancement: Reason given is-
The compiler is free to inline calls to them because it “knows” they will not be overridden by a subclass.
When a small final method is called, often the Java compiler can copy the bytecode for the subroutine directly inline with the compiled code of the calling method, thus eliminating the costly overhead associated with a method call. Inlining is only an option with final methods.
I am not able to understand the second point.Can somebody please explain?What exactly is Inlining?