Category Archives: Array,List,Collections

array, list, collections, java example source code

5,900 views

Map TreeMap get key by value Java Android example

Get key by value from Map Java Android example MainClass.java import java.util.HashSet; import java.util.Iterator; import java.util.Map; import java.util.Map.Entry; import java.util.Set; import java.util.TreeMap;   public class MainClass { public static void main(String[] arg) {   // english;germany dictionary String[] arrayOfString = … Continue reading

Posted in Android Examples Code, Array,List,Collections | Tagged , , , , , | Comments Off on Map TreeMap get key by value Java Android example
4,353 views

Map TreeMap key value pair sort by value Java Android example

Map TreeMap sorted by value Java Android example. MainClass.java   import java.util.Comparator; import java.util.Map; import java.util.Map.Entry; import java.util.SortedSet; import java.util.TreeMap; import java.util.TreeSet;   public class MainClass { public static void main(String[] arg) {   // english;germany dictionary String[] arrayOfString = … Continue reading

Posted in Android Examples Code, Array,List,Collections | Tagged , , , | Comments Off on Map TreeMap key value pair sort by value Java Android example
4,845 views

Map TreeMap key value pair sort by key, using of iterator Java Android example

Map TreeMap key value pair, Map sort by key, Iterator for Map Java Android example. MainClass.java import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import java.util.TreeMap;   public class MainClass { public static void main(String[] arg) … Continue reading

Posted in Android Examples Code, Array,List,Collections | Tagged , , , , , , , | Comments Off on Map TreeMap key value pair sort by key, using of iterator Java Android example
2,143 views

Map TreeMap key value pair add put get pair by key Java Android example

Map TreeMap add key value pair get find pair by key Java Android example. MainClass.java import java.util.Map; import java.util.TreeMap;   public class MainClass { public static void main(String[] arg) {   // english;germany dictionary String[] arrayOfString = { "one;eine", "two;zwei", … Continue reading

Posted in Android Examples Code, Array,List,Collections | Tagged , , , , | Comments Off on Map TreeMap key value pair add put get pair by key Java Android example
7,801 views

Hashtable find value by key Java Android example

Hashtable find value by key Java Android basic example. import java.util.Hashtable;   public class MainClass { public static void main(String[] arg) {   // english;germany dictionary String[] arrayOfString = { "one;eine", "two;zwei", "three;drei" };   Hashtable hashTable = new Hashtable(); … Continue reading

Posted in Android Examples Code, Array,List,Collections | Tagged , , , , , | Comments Off on Hashtable find value by key Java Android example
13,548 views

Hashtable key value pair add put get pair Java Android example

How add pair of strings to Hashtable, how get pair key value from Hashtable, how split string, basic Java Android example. MainClass.java import java.util.Enumeration; import java.util.Hashtable; public class MainClass { public static void main(String[] arg) {   // english;germany dictionary … Continue reading

Posted in Android Examples Code, Array,List,Collections | Tagged , , , , , | Comments Off on Hashtable key value pair add put get pair Java Android example
6,227 views

Shuffle List ArrayList Collections Java example

Add and shuffle elements in LinkedList or ArrayList Java basic example. import java.util.Collections; import java.util.LinkedList; import java.util.List;   public class MainClass { public static void main(String[] arg) { String[] arrayOfString = {"nothing", "Hello", "people" , "bye-bye", "hello", "world!", "End" }; … Continue reading

Posted in Android Examples Code, Array,List,Collections | Tagged , , , , , | Comments Off on Shuffle List ArrayList Collections Java example
5,800 views

List LinkedList add sort find Item in Java example

List LinkedList Collections add sort find search Item, get searched item to string in Java example. MainClass.java import java.util.Collections; import java.util.LinkedList; import java.util.List;   public class MainClass { public static void main(String[] arg) { String[] arrayOfString = {"nothing", "Hello", "people" … Continue reading

Posted in Android Examples Code, Array,List,Collections | Tagged , , , , , , | Comments Off on List LinkedList add sort find Item in Java example
8,042 views

ArrayList Collections Add new Item Sort Find Item Java example

How add item to ArrayList, sort ArrayList, search find index of item in ArrayList, min(), max() Java basic example. import java.util.ArrayList; import java.util.Collections;   public class MainClass { public static void main(String[] arg) { String[] arrayOfString = {"nothing", "Hello", "people" … Continue reading

Posted in Android Examples Code, Array,List,Collections | Tagged , , , , , | Comments Off on ArrayList Collections Add new Item Sort Find Item Java example
8,162 views

Create array of strings in xml file Android example

Example source code for Android developers how create array of strings in *.xml file. You can using array of strings in Spinner ( combobox – dropdown list ) or ListView etc. <resources> <string-array name="colors"> <item>red</item> <item>orange</item> <item>yellow</item> <item>green</item> <item>blue</item> </string-array> … Continue reading

Posted in Android Examples Code, Array,List,Collections | Tagged , , , | Comments Off on Create array of strings in xml file Android example