Join
Blogs
Questions
Videos
Tags
Members
Search
 
 
Create your own blog, earn points and get popular!

Collection

chris_lab's picture

HashMap nad Methods

Hi I have a file customer.txt and it contains details of the customer.

in my programme i have an abstract class caled Customer which is extended by two subclasses OnlineCustomer and IndoorCustomer.

What i need to do is read the content of the file and store it in a HashMap. i need to use a method as the value of the HashMap

something like
0
Your rating: None
Deepthi's picture

Java Convert Collection to ArrayList

3
Your rating: None Average: 3 (2 votes)
This Java convert Collection to ArrayList example shows how to convert any collection to ArrayList.
  1. import java.util.ArrayList;
  2. import java.util.HashSet;
  3.  
  4. //Java Convert Collection to ArrayList
  5.  
  6. public class ConverCollectionToArrayList {
  7.    
  8.     public static void main(String args[]){
  9.        
  10.         //Create new HashSet
  11.         HashSet<String> hashSetColors = new HashSet&
Andr's picture

Intermediate Java Tutorial - HashSet

Video Tutorial: 
See video
Andr's picture

Intermediate Java Tutorial - Queue

Video Tutorial: 
See video
Andr's picture

Intermediate Java Tutorial - Stacks Push Pop

Video Tutorial: 
See video
Syndicate content