i am reading data from a text file and want to store HashMap in another HashMap..
HashMap>
how to
HashMap in HashMap will cause problems in readability especially when it goes beyond two levels. I assume that when you read data from a text file you want to categorize the inputs from rows and columns which should be similar to multi-level categories or category within a category. If you can post the sample data and your intention, I could come up with a Custom class example.
public class Category {
private List subCategories;
private List- items;
}
The above data structure will help you solve any level of nesting while categorizing data. This example is specific to a store items' classification.