Are there inline functions in Java?

Java 8Object Oriented ProgrammingProgramming

If a function is inline, the compiler places a copy of the code of that function at each point where the function is called at compile time.

Any change to an inline function could require all clients of the function to be recompiled because compiler would need to replace all the code once again otherwise it will continue with old functionality.

No, Java does not provide inline functions it is typically done by the JVM at execution time.

raja
Published on 08-Jan-2018 07:42:51
Advertisements