3

The following statement gives error. What is the problem?

Map<string, customB__c=""> myBMap = new Map<id, customB__c="">();

Error is

Error: Compile Error: unexpected token: 'Map' at line 11 column 0

Please advice.

9

You need to declare it like this

Map<Id,YourObject> myMap = new Map<Id,YourObject>();

Map class

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.