function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Abhishek Sharma 527Abhishek Sharma 527 

unexpected token: '<EOF>' Error while saving in comment

Hello there, I'm unable to save the code, it shows unexpected  token: '<EOF>' 
I'm trying to save this within comment.
here's my code - 
  
 
  
  /*        Map<String,String> NDCM = new Map<String,String>{'K'=>'111'};
        Map<String,String> CGCM = new Map<String,String>{'B'=>'222'};
            Map<String,String> TNCM = new Map<String,String>{'KS'=>'333'};
  

        Map<String, Map<String,String>> IN_ST_L = new Map<String, Map<String,String>>{'New Delhi'=> NDCM, 'Chhattisgarh'=> CGCM, 'Telangana'=> TNCM };
        Map<String, Map<String,String>> US_ST_L = new Map<String, Map<String,String>>{'New York'=> NDCM, 'Texas'=> CGCM, 'FLorida'=> TNCM };

Map<String, Map<String, Map<String,String>>> C_ST_CML = new Map<String, Map<String, Map<String,String>>>{'INDIA'=> IN_ST_L, 'USA'=> US_ST_L};
System.debug(C_ST_CML);*/

Please help !
Best Answer chosen by Abhishek Sharma 527
Sai PraveenSai Praveen (Salesforce Developers) 
Hi,

The class should contain the name and { and } as well I guess. Can you share the entire class ?

For example for the below class the name is SendEmailClass and it saved succesfully with out any error.
 
public class SendEmailClass {
  /*        Map<String,String> NDCM = new Map<String,String>{'K'=>'111'};
        Map<String,String> CGCM = new Map<String,String>{'B'=>'222'};
            Map<String,String> TNCM = new Map<String,String>{'KS'=>'333'};
  

        Map<String, Map<String,String>> IN_ST_L = new Map<String, Map<String,String>>{'New Delhi'=> NDCM, 'Chhattisgarh'=> CGCM, 'Telangana'=> TNCM };
        Map<String, Map<String,String>> US_ST_L = new Map<String, Map<String,String>>{'New York'=> NDCM, 'Texas'=> CGCM, 'FLorida'=> TNCM };

Map<String, Map<String, Map<String,String>>> C_ST_CML = new Map<String, Map<String, Map<String,String>>>{'INDIA'=> IN_ST_L, 'USA'=> US_ST_L};
System.debug(C_ST_CML);*/

}

Let me know if you face any issues.

If this solution helps, Please mark it as best answer.

Thanks,

All Answers

Sai PraveenSai Praveen (Salesforce Developers) 
Hi Abshiek,

Can you share entire code of the class which you are trying to save 

Thanks,
 
Abhishek Sharma 527Abhishek Sharma 527
Hello Sai, this is the only code in this class. I'm trying to save this as comment
Sai PraveenSai Praveen (Salesforce Developers) 
Hi,

The class should contain the name and { and } as well I guess. Can you share the entire class ?

For example for the below class the name is SendEmailClass and it saved succesfully with out any error.
 
public class SendEmailClass {
  /*        Map<String,String> NDCM = new Map<String,String>{'K'=>'111'};
        Map<String,String> CGCM = new Map<String,String>{'B'=>'222'};
            Map<String,String> TNCM = new Map<String,String>{'KS'=>'333'};
  

        Map<String, Map<String,String>> IN_ST_L = new Map<String, Map<String,String>>{'New Delhi'=> NDCM, 'Chhattisgarh'=> CGCM, 'Telangana'=> TNCM };
        Map<String, Map<String,String>> US_ST_L = new Map<String, Map<String,String>>{'New York'=> NDCM, 'Texas'=> CGCM, 'FLorida'=> TNCM };

Map<String, Map<String, Map<String,String>>> C_ST_CML = new Map<String, Map<String, Map<String,String>>>{'INDIA'=> IN_ST_L, 'USA'=> US_ST_L};
System.debug(C_ST_CML);*/

}

Let me know if you face any issues.

If this solution helps, Please mark it as best answer.

Thanks,

This was selected as the best answer
Abhishek Sharma 527Abhishek Sharma 527
Hi Tom, you just have to keep it inside class example - public class demo{ Map NDCM = new Map{'K'=>'111'}; Map CGCM = new Map{'B'=>'222'}; Map TNCM = new Map{'KS'=>'333'}; Map> IN_ST_L = new Map>{'New Delhi'=> NDCM, 'Chhattisgarh'=> CGCM, 'Telangana'=> TNCM }; Map> US_ST_L = new Map>{'New York'=> NDCM, 'Texas'=> CGCM, 'FLorida'=> TNCM }; Map>> C_ST_CML = new Map>>{'INDIA'=> IN_ST_L, 'USA'=> US_ST_L}; System.debug(C_ST_CML);*/ }