Wednesday 10 May 2017

Java Tutorial: Annotations in java | Java annotations [Annotations introduction]


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

Click the below Image to Enlarge
Java Tutorial: Annotations in java | Java annotations [Annotations introduction] 
AnnotationsDemo.java
import java.util.ArrayList;

public class AnnotationsDemo
{

    /*
     * If you remove the @SuppressWarnings("unchecked")
     * annotation, it will show warning at compile time
     * because we are using non-generic collection.
     */
    @SuppressWarnings({ "rawtypes", "unchecked" })
    public static void main(String args[])
    {
        ArrayList list = new ArrayList();
        list.add("Ram");
        list.add("Peter");

        for (Object obj : list)
        {
            System.out.println(obj);
        }

    }
}
Click the below link to download the code:
https://sites.google.com/site/ramj2eev1/home/javabasics/AnnotationDemo_Intro_App.zip?attredirects=0&d=1

Github Link:
https://github.com/ramram43210/Java/tree/master/BasicJava/AnnotationDemo_Intro_App/AnnotationDemo

Bitbucket Link:
https://bitbucket.org/ramram43210/java/src/47d09ebb24294f7b507419345f38ec4cde27d544/BasicJava/AnnotationDemo_Intro_App/AnnotationDemo/?at=master

See also:
  • All JavaEE Viedos Playlist
  • All JavaEE Viedos
  • All JAVA EE Links
  • Servlets Tutorial
  • All Design Patterns Links
  • JDBC Tutorial
  • Java Collection Framework Tutorial
  • JAVA Tutorial
  • Kids Tutorial
  • No comments:

    Post a Comment