Privacy Policy Terms Of Use. Copyright © 2006-2010 Java Tutorials and Examples.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
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
HashMap hm = new HashMap();
hm.put(cusID, new Customer(tempid,tempname,tempadd,tempphone));
this runs in a loop and insers data read from the file into the hashmap according to the type of the customer.
if it's a online customer it calls the method in the onlinecustomer class else the indoorcustomer class
how can i do it?
thanx
