5:23 am - Wednesday February 21, 2018

Archive: Z-A All Java Codes Subscribe to Z-A All Java Codes

Properties example program using void store(OutputStream out, String comments)

BACK                   This Properties example program writes this property list (key and element pairs) in this Properties table to the output stream in a format suitable for loading into a Properties table using the load(InputStream)...

Properties example program using Object setProperty(String key, String value)

BACK This Properties example program Calls the Hashtable method put using Object setProperty(String key, String value) method Example Program import java.util.*; import java.io.*; public class PropSetprop { public static void main(String[]...

Properties example program using Enumeration propertyNames() method

BACK This Properties example Program using Enumeration<?>  propertyNames() method Example Program import java.util.*; public class PropEnumPropNames { public static void main(String[] args) { Properties prop = new...

Properties example program using load from xml(InputStream in)

BACK This Properties example program id used load from xml using xml(InputStream in) method. Example Program import java.io.*; import java.util.*; public class PropLoadForm { public static void main(String[] args) throws IOException...

Hash table example program using entry set of the values

BACK This Hash table Program is used for entry set of the values using entry set() method Example Program import java.util.Hashtable; import java.util.Set; public class HashTableSet { public static void main(String[] args) { //...

Hash table example program enumeration of the values using enumaration() method

BACK This Hash table Program is used for enumaration of the values using enumaration() method. Example Program import java.util.Enumeration; import java.util.Hashtable; public class HashTableEnum { public static void main(String[]...

Hash table example program using the boolean value is available using boolean() method.

BACK This program Hash Table used boolean value is availbale using boolean() method. Example Program import java.util.Hashtable; public class HashTableboolean { public static void main(String[] args) { // create two has table Hashtable...

Hash table example program to copy clone value using Clone() method

BACK This Program Hash Table used to copy clone value using Clone() method Example Program import java.util.Hashtable; public class HashTableClone { public static void main(String[] args) { // create two has table Hashtable...

Hash table example program to clear the hash table value using Clear() method

BACK This Program is used clear the hash table values using Clear() method. Example Program import java.util.Hashtable; import java.util.Iterator; public class SimpleHashTable { public static void main(String[] args) { Hashtable...

Hash table example program to clear the hash table value using clear() method

BACK This Program is used clear the hash table values using Clear() method. Example Program import java.util.Hashtable; import java.util.Iterator; public class SimpleHashTable { public static void main(String[] args) { Hashtable...

PriorityQueue example program for retrieving, but does not remove, the head of this queue, or returns null if this queue is empty using Peek() method.

BACK This Program is used   for  retrieving, but does not remove, the head of this queue, or returns null if this queue is empty using  Peek() method. Example Program import java.util.PriorityQueue; import java.util.comparator; public...

PriorityQueue program using poll() method

BACK This Program is used PriorityQueue using poll() method. Example Program import java.util.PriorityQueue; public class PriorityQ { public static void main(String[] args) { PriorityQueue PQ = new PriorityQueue (); PQ.add(100); PQ.add(12); PQ.add(56); PQ.add(89); PQ.add(103); System.out.println("The...

EnumMap for Mapping in Specfic Key using ContainsKey() method

BACK This Program is used EnumMap for Mapping in Specific Key using  ConstraintsKey() method Example Program package com.example; import java.util.EnumMap; public class EnumMapContainsKey { // create an enum public enum Numbers { ONE,...

EnumMap String and Number in Same using PutAll() method

BACK This Program is used EnumMap String and Number in Same by using PutAll() method. Example Program package com.example; package com.example; import java.util.*; public class EnumMapPutAll { // create an enum public enum Numbers...

EnumMap example programs and Tutorial in java

BACK   1.EnumMap String and Number in Same  using PutAll() method 2.EnumMap  to find Elements are Equals by using Equals() method 3.EnumMap   for Mapping in Specfic Key using ContainsKey() method 4.EnumMap  Set View Contained on...

Clear the Element using HashSet Clear() method

BACK This program used to clear the element by using HashSet Clear() method. Example Program package com.example; import java.util.*; public class HashSetDemo { public static void main(String args[]) { // create hash set HashSet<String>...

To find size of element HashSet Size() method

BACK This Program used to find the size of element using Hashset Size() method Example Program package com.example; import java.util.HashSet; public class FindSize { public static void main(String a[]) { HashSet<Integer>...

HashSet to use copy of another object Clone() method

BACK This Program used to copy of another object using clone() method. Example Program package com.example; import java.util.HashSet; public class Retreive { public static void main(String a[]) { HashSet set = new HashSet(); HashSet...

HashSet to using find Max and Min Number Max() and Min() Method

BACK This Program used to find  Max and Min from hashset by using Max() and Max() method. Example Program import java.util.HashSet; import java.util.Collections; class FindMaxHashSet { public static void main(String[] args) {...

HashSet to remove specfic element on output Remove() method

BACK This Program used to remove the specific element from hashset by using remove() method. Example Program package com.example; import java.util.HashSet; class HashSetRemove { public static void main(String[] args) {// creating...