Reading java documentation links helps you to understand differences clearly.
java.lang.reflect
Provides classes and interfaces for obtaining reflective information about classes and objects.
Reflection allows programmatic access to information about the fields, methods and constructors of loaded classes, and the use of reflected fields, methods, and constructors to operate on their underlying counterparts, within security restrictions.
java.lang.invoke
The java.lang.invoke package contains dynamic language support provided directly by the Java core class libraries and virtual machine.
As described in the Java Virtual Machine Specification, certain types in this package have special relations to dynamic language support in the virtual machine:
The class MethodHandle
contains signature polymorphic methods which can be linked regardless of their type descriptor. Normally, method linkage requires exact matching of type descriptors.
The JVM bytecode format supports immediate constants of the classes MethodHandle
and MethodType
.