Wednesday, 11 May 2016

Java Tutorial : Java Unboxing (list)


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

Click the below Image to Enlarge
Java Tutorial : Java Unboxing (list)
Java Tutorial : Java Unboxing (list)
UnBoxingDemo.java
import java.util.ArrayList;
import java.util.List;

public class UnBoxingDemo
{

    public static void main(String[] args)
    {
        List<Integer> list = new ArrayList<>();
        list.add(new Integer(1));
        list.add(new Integer(2));
        for (Integer integerObj : list)
        {
            int i = integerObj; // Unboxing
            System.out.println(i);
        }

    }

}
Output
1
2
Click the below link to download the code:
https://sites.google.com/site/javaee4321/java/UnBoxingDemo_list_App.zip?attredirects=0&d=1

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

Bitbucket Link:
https://bitbucket.org/ramram43210/java/src/c539eeaf4c6ff331d8e2aa2333826ea70c999093/BasicJava/UnBoxingDemo_list_App/?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
  • No comments:

    Post a Comment

    Google+ Followers

    Google+ Badge