![]() |
The Java Reflection and Annotations are powerful features that provide dynamic and metadata-driven capabilities to Java applications. The Reflection allows the examination and manipulation of the class properties, methods, and fields at runtime while Annotations provide a way to add metadata and behavior to the code. Reflection in JavaThe Java Reflection is a mechanism that allows to inspect and interact with components of the Java class at runtime. It provides a way to examine or modify the runtime behavior of the applications.
Use Cases:
Example of Java Reflection: Java
Output
Method Name: method1 Method Name: method2 Annotations in JavaThe Annotations in Java are a form of the metadata that can be added to Java code to provide information about the code to compiler and runtime environment.
Use Cases:
Example: Java
Explanation of the Program:
|
Reffered: https://www.geeksforgeeks.org
Advance Java |
Related |
---|
![]() |
![]() |
![]() |
![]() |
![]() |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 15 |