Skip to content

Java Vogue

Java Tutorials

  • All Tutorials
  • Java
  • Java8
  • Spring Boot
  • Microservices
  • Spring
  • Hibernate
  • Reactjs
  • Interview Question
  • Contact

Category: java collection framework example

June 11, 2015 javavogue

How to storing Java Object In HashTable

import java.util.Hashtable; import java.util.Set; public class HashTableOfObject { public static void main(String[] args) { Hashtable<Integer,User> ht = new Hashtable<Integer,User>(); ht.put(1,new

Continue reading
June 11, 2015 javavogue

How to create HashTable In Java

import java.util.Hashtable; public class CreateHashTable { public static void main(String[] args) { Hashtable<Integer,String> ht = new Hashtable<Integer,String>(); /* * Maps

Continue reading
June 6, 2015 javavogue

Java Array to Set

In this tutorial we will learn about How to convert java array to Set . We will discuss how to

Continue reading
June 4, 2015 javavogue

Java Initialize Set

In this tutorial we will learn how to initialize set in java using various methods . We can create Set

Continue reading
June 2, 2015 javavogue

Java TreeSet Examples

TreeSet extends AbstractSet and implements NavigableSet interface. TreeSet is similar to HashSet except that it store element in sorted order.The

Continue reading
June 2, 2015 javavogue

How to check LinkedHashSet Empty Or not

package com.javapro.vector.linkedhashset; import java.util.LinkedHashSet; import java.util.Set; public class IsEmpty { public static void main(String[] args) { Set<String> lhs = new

Continue reading
June 2, 2015 javavogue

How to count number of element in LinkedHashSet

import java.util.LinkedHashSet; import java.util.Set; public class CountElement { public static void main(String[] args) { Set<String> lhs = new LinkedHashSet<String>(); lhs.add(“mumbai”);

Continue reading
June 2, 2015 javavogue

How to find does LinkedHashSet contains elements or not

Returns true if this set contains the specified element. More formally, returns true if and only if this set contains

Continue reading
June 2, 2015 javavogue

How To Convert LinkedHashset To Array

import java.util.LinkedHashSet; import java.util.Set; public class LinkedHashSetToArray { public static void main(String[] args) { Set<String> lhs = new LinkedHashSet<String>(); lhs.add(“mumbai”);

Continue reading
June 2, 2015 javavogue

How to Remove Set From LinkedHashSet

import java.util.HashSet; import java.util.LinkedHashSet; import java.util.Set; public class RemoveAll { public static void main(String[] args) { Set<String> lhs = new

Continue reading

Posts navigation

«Previous Posts 1 2 3 4 Next Posts»

Recent Posts

  • Java Program to display student details Using Class and Object
  • TreeMap floorEntry() method in Java
  • Check If Int is Null In Java
  • Java Math min() method example
  • TreeMap ceilingKey() method in Java

Popular Posts

  • How to Read value From application.properties in spring boot
  • ‘Field required a bean of type that could not be found.’ error spring restful API
  • How to Reload Changes Without Restarting the Server – Spring Boot
  • No converter found for return value of type: org.springframework.http.converter.HttpMessageNotWritableException: No converter found
  • Spring Boot @ConfigurationProperties Property Validation
hi