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) |
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); } } }
1 2
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:
No comments:
Post a Comment