JavaTweets

Blog on Java Programming and Interview Questions

HashSet Examples


  • Simple Java HashSet example
  • Remove all elements from Java HashSet example
  • Remove specified element from Java HashSet example
  • How to remove duplicate element from array?
  • Get Size of Java HashSet Example
  • Check if a particular element exists in Java HashSet Example
  • Display all elements in a Java HashSet
  • Convert HashSet to Array in Java
  • Convert Array to HashSet in Java
  • Get Synchronized Set from Java HashSet example
  • Find maximum element of Java HashSet Example
  • Find Minimum element of Java HashSet Example
  • Get Enumeration over HashSet
  • Copying and Cloning Sets: public Object clone()

Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Home
Subscribe to: Posts (Atom)

Total Pageviews

Blog Archive

  • ▼  2012 (254)
    • ▼  August (44)
      • When should I use an interface instead of an abstr...
      • Compare two StringBuffer objects in Java
      • New Java 7 Features: Using String in the Switch St...
      • Comparing String with StringBuilder in Java
      • Comparing String with StringBuffer in Java
      • Difference between == , equals and equalsIgnoreCase
      • Java String to byte Array Example
      • Java Substring Example
      • Java String to Upper Case example
      • Java String to Lower Case example
      • Java String isEmpty Example
      • Java String Reverse Example
      • Java String Trim Example
      • Java String Split Example
      • Java String Replace Example
      • Java String Length Example
      • Determining If a String Contains a Substring in Java
      • Java String Concatenation and Performance
      • Java String Compare using compareTo and compareToI...
      • Java String methods - indexOf() and lastIndexOf()
      • Searching a String for a Character or a Substring ...
      • Java Char Array To String Example
      • Convert String to Character Array Example
      • Copy all the key-value pairs from one Map into ano...
      • Get Tail Map from Java TreeMap example
      • Get Head Map from Java TreeMap example
      • Get Sub Map from Java TreeMap example
      • Get lowest and highest key stored in Java TreeMap ...
      • Get Synchronized Map from Java TreeMap example
      • Remove value from Java TreeMap example
      • Remove all values from Java TreeMap example
      • Get Size of Java TreeMap Example
      • Check if a particular value exists in Java TreeMap...
      • Check if a particular key exists in Java TreeMap e...
      • How to get all keys in Java TreeMap?
      • Get Set view of Keys from Java TreeMap example
      • Iterate through the values of Java TreeMap example
      • Simple Java TreeMap example
      • Checked vs Unchecked Exceptions in Java
      • Creating user defined exceptions in Java
      • Exception Handling : Throws clause in Java
      • Difference between throw and throws in Java?
      • How to Throw Exceptions in Java
      • What is finally block in java?
    • ►  July (134)
    • ►  June (13)
    • ►  May (2)
    • ►  April (10)
    • ►  March (14)
    • ►  February (18)
    • ►  January (19)
  • ►  2011 (3)
    • ►  December (3)

Categories

  • Home
  • SCJP Objective Questions
  • ArrayList Examples
  • Date & Calendar Examples
  • Files and I/O
  • java.util.zip
  • LinkedList Examples
  • Object Cloning
  • Serialization
  • Wrapper classes
  • Collections Framework
  • Multithreading
  • HashSet Examples
  • TreeSet Examples
  • Utility class - Collections
  • HashMap Examples
  • String Examples
  • TreeMap Examples
  • Exception Handling

Search This Blog

Followers

blog status

Popular Posts

  • Access Modifiers In Java
    There are four access modifiers to help you set the level of access you want for classes as well as the fields, methods and const...
  • Get Synchronized Map from Java HashMap example
    This java example shows how to get a synchronized Map from Java HashMap using synchronizedMap method of Collections class. import java....
  • Difference Between volatile and synchronized in Java
    Before discussing the difference between volatile and synchronized we have to know a little about java memory model,if one instance or sta...
  • Byte streams vs Character streams in Java
    Byte streams are generally designed to deal with "raw" data (like image file,mp3 etc.) from a file or stream.A byte stream access ...
  • Blank Final Variables in Java
    The blank final , which was introduced in Java 1.1, is a final variable whose declaration lacks an initialization. A blank final must be in...
  • Difference between == , equals and equalsIgnoreCase
    A lot of Java new programmers get confused when comparing String with another. With so many different ways to do comparison on String, every...
  • Wrapper classes in Java
    Java is not a pure object oriented langauage, Why?.The Java primitive types (byte,short,int,long,float,double,char,boolean) are implemente...
  • Declarations and Access Control - Objective Questions -Part 1
    1) // Class A is declared in a file named A.java. package com.dan.chisholm; public class A {   public void m1() {System.out.print(...
  • Converting Numbers to Strings in Java
    Sometimes you need to convert a number to a string because you need to operate on the value in its string form. There are several easy way...
  • How to Throw Exceptions in Java
    It is possible for your program to throw an exception explicitly, using the throw statement. The general form of throw is shown here: thro...
Powered by Blogger.