Friday, 9 June 2017

Java Tutorial: Annotations in java [How to define a custom or user-defined annotation] ~ foundjava


Click here to watch in Youtube :
https://www.youtube.com/watch?v=ynaNgScDxDI&list=UUhwKlOVR041tngjerWxVccw

Click the below Image to Enlarge
Java Tutorial: Annotations in java [How to define a custom or user-defined annotation] 
AnnotationsDemo.java
@interface MyAnnotation
{
    
} 

public class AnnotationsDemo
{
    @MyAnnotation
    public static void main(String args[])
    {
        System.out.println("Hi");
    }
}
Output
Hi
Click the below link to download the code:

CLICK HERE

No comments:

Post a Comment