{"id":65876,"date":"2021-07-16T22:44:09","date_gmt":"2021-07-17T02:44:09","guid":{"rendered":"http:\/\/bangla.salearningschool.com\/recent-posts\/set-treeset-iterator-in-java-java-short-notes-blog\/"},"modified":"2021-07-16T22:44:09","modified_gmt":"2021-07-17T02:44:09","slug":"set-treeset-iterator-in-java-java-short-notes-blog","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=65876","title":{"rendered":"Set, TreeSet, Iterator in Java #Java Short Notes #Blog"},"content":{"rendered":"<p><pre style='padding-left:5px;padding-right:5px'>\/* * TreeSetExample.java * *Illustrates mathematical set operations * * Created on January 10, 2008, 9:28 PM * * To change this template, choose Tools | Template Manager * and open the template in the editor. *\/package treesetexample;import java.util.Set;import java.util.TreeSet;import java.util.Iterator;\/** * * @author Sayed *\/public class TreeSetExample {        \/** Creates a new instance of TreeSetExample *\/    public TreeSetExample() {    }        \/\/example set operations      public static void treeSetOperations() {        final int MAXIMUM = 20;        \/\/create a TreeSet        Set ss = new TreeSet();        \/\/store data in the set, set can contain only one type of data        for (int i = 0; i &lt; MAXIMUM; i++) {            System.out.println(&quot;  - Storing Data(&quot; + i + &quot;)&quot;);            ss.add(new Integer(i));        }        \/\/display set data using an iterator        Iterator it = ss.iterator();        while (it.hasNext()) {            System.out.println(it.next());        }    }            \/**     * @param args the command line arguments     *\/    public static void main(String[] args) {        \/\/ TODO code application logic here        TreeSetExample treeSet = new TreeSetExample();        treeSet.treeSetOperations();    }    }<\/pre>\n<\/p>\n<p> From: http:\/\/sitestree.com\/?p=4789<br \/> Categories:Java Short Notes, Blog<br \/>Tags:<br \/> Post Data:2013-06-23 13:04:36<\/p>\n<p>\t\tShop Online: <a href='https:\/\/www.ShopForSoul.com\/' target='new' rel=\"noopener\">https:\/\/www.ShopForSoul.com\/<\/a><br \/>\n\t\t(Big Data, Cloud, Security, Machine Learning): Courses: <a href='http:\/\/Training.SitesTree.com' target='new' rel=\"noopener\"> http:\/\/Training.SitesTree.com<\/a><br \/>\n\t\tIn Bengali: <a href='http:\/\/Bangla.SaLearningSchool.com' target='new' rel=\"noopener\">http:\/\/Bangla.SaLearningSchool.com<\/a><br \/>\n\t\t<a href='http:\/\/SitesTree.com' target='new' rel=\"noopener\">http:\/\/SitesTree.com<\/a><br \/>\n\t\t8112223 Canada Inc.\/JustEtc: <a href='http:\/\/JustEtc.net' target='new' rel=\"noopener\">http:\/\/JustEtc.net (Software\/Web\/Mobile\/Big-Data\/Machine Learning) <\/a><br \/>\n\t\tShop Online: <a href='https:\/\/www.ShopForSoul.com'> https:\/\/www.ShopForSoul.com\/<\/a><br \/>\n\t\tMedium: <a href='https:\/\/medium.com\/@SayedAhmedCanada' target='new' rel=\"noopener\"> https:\/\/medium.com\/@SayedAhmedCanada <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\/* * TreeSetExample.java * *Illustrates mathematical set operations * * Created on January 10, 2008, 9:28 PM * * To change this template, choose Tools | Template Manager * and open the template in the editor. *\/package treesetexample;import java.util.Set;import java.util.TreeSet;import java.util.Iterator;\/** * * @author Sayed *\/public class TreeSetExample { \/** Creates a new instance of &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=65876\">Continue reading<\/a><\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1917],"tags":[],"class_list":["post-65876","post","type-post","status-publish","format-standard","hentry","category-fromsitestree-com","item-wrap"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":65912,"url":"http:\/\/bangla.sitestree.com\/?p=65912","url_meta":{"origin":65876,"position":0},"title":"Linked List and Iterator in Java #Java Short Notes","author":"Author-Check- Article-or-Video","date":"July 17, 2021","format":false,"excerpt":"\/* * LinkedList.java * * Created on January 10, 2008, 8:51 PM * * To change this template, choose Tools | Template Manager * and open the template in the editor. *\/package linkedlist;import java.util.List;import java.util.LinkedList;import java.util.Iterator;import java.util.ListIterator;import java.util.Collections;import java.util.Random;\/** * * @author Sayed *\/public class LinkedListTest { \/** Creates a\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":23218,"url":"http:\/\/bangla.sitestree.com\/?p=23218","url_meta":{"origin":65876,"position":1},"title":"Linked List and Iterator in Java #Root #By Sayed Ahmed","author":"Author-Check- Article-or-Video","date":"March 27, 2021","format":false,"excerpt":"By Sayed: 8 [use Firefox or IE with large font size] \/* * LinkedList.java * * Created on January 10, 2008, 8:51 PM * * To change this template, choose Tools | Template Manager * and open the template in the editor. *\/ package linkedlist; import java.util.List; import java.util.LinkedList; import\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":10102,"url":"http:\/\/bangla.sitestree.com\/?p=10102","url_meta":{"origin":65876,"position":2},"title":"J2SE : LinkedList and Iterators in Java","author":"","date":"July 31, 2015","format":false,"excerpt":"\/* \u00a0* LinkedList.java \u00a0* \u00a0* Created on January 10, 2008, 8:51 PM \u00a0* \u00a0* To change this template, choose Tools | Template Manager \u00a0* and open the template in the editor. \u00a0*\/ package linkedlist; import java.util.List; import java.util.LinkedList; import java.util.Iterator; import java.util.ListIterator; import java.util.Collections; import java.util.Random; \/** \u00a0* \u00a0* @author\u2026","rel":"","context":"In &quot;Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8&quot;","block_context":{"text":"Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8","link":"http:\/\/bangla.sitestree.com\/?cat=1417"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":26862,"url":"http:\/\/bangla.sitestree.com\/?p=26862","url_meta":{"origin":65876,"position":3},"title":"LinkedList and Iterators in Java #Programming Code Examples #Java\/J2EE\/J2ME #J2SE","author":"Author-Check- Article-or-Video","date":"May 3, 2021","format":false,"excerpt":"\/* * LinkedList.java * * Created on January 10, 2008, 8:51 PM * * To change this template, choose Tools | Template Manager * and open the template in the editor. *\/ package linkedlist; import java.util.List; import java.util.LinkedList; import java.util.Iterator; import java.util.ListIterator; import java.util.Collections; import java.util.Random; \/** * * @author\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":65858,"url":"http:\/\/bangla.sitestree.com\/?p=65858","url_meta":{"origin":65876,"position":4},"title":"SCJP Essential Knowledge #Java Short Notes #SCJP","author":"Sayed","date":"July 16, 2021","format":false,"excerpt":"int x=5; String y=\"3\"; System.out.print(x + 1 + y); Output: 63 When there is no live reference to an object, the object becomes eligible for garbage collection. The concrete interface method implementation must be public. When a class implements Comparator, it must implement a compare method. When a class implements\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":66322,"url":"http:\/\/bangla.sitestree.com\/?p=66322","url_meta":{"origin":65876,"position":5},"title":"Java Connector Overview and an Example #Java Short Notes","author":"Author-Check- Article-or-Video","date":"July 18, 2021","format":false,"excerpt":"Java Connector Architecture (JCA) enables integration of the J2EE components to any Enterprise Information Systems (EIS). EIS can be heterogeneous where scalability is a must. JDBC assumes DBMS\/RDBMS in the back-end, JCA targets any kind of EIS. One of the key parts of JCA is the Resource Adapter - usually\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/65876","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=65876"}],"version-history":[{"count":0,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/65876\/revisions"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=65876"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=65876"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=65876"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}