●Mapの利用方法:

Map<String,String> myMap = new Map<String,String>{‘A1’=>’a1’,’A2’=>’a2’…);

●Map2

Map<Id,Account> myMap = new Map​<Id,Account>([Select id,name from Account]);

​●Map3

Map<Id,Account> myMap = new Map​<Id,Account>([Select id,name from Account]);​

List<Id> myId = New List<Id>(myMap.keySet());