I have 2 maps as shown below and I want the output as a new Map in the required format shown below? Please suggest if this is possible.
Map<String,String> abc = new HashMap<String, String>();
abc.put("Apple", "Mobile");
abc.put("Apple", "Tablet");
Map<String,String> def = new HashMap<String, String>();
def.put("Mobile", "iphone5");
def.put("Tablet", "iMini");
Required o/p format"
Map<String,Map<String,String>> xyz= new HashMap<String, Map<String,String>>();
Example {{Apple={Mobile=[iphone]},Apple={Tablet=[iMini]}}