Hi @sonuk85184451
1. B
As it is mentioned in the question itself to use sling API. Option 1 is appropriate as it is applying all required null checks and using sling API valueMap and Resource
2. A
Refer https://docs.adobe.com/content/help/en/experience-manager-64/administering/security/encryption-suppo...
3. A and D
The bundle providing service must export as well as bundle using service must import
4. A
As the functionality is resuable and belong to component B, option A seems approriate.
5. C
Refer https://helpx.adobe.com/experience-manager/using/osgi_config63.html
6. A
com.sample.package.b was never exported and com.sample.package.c was available with version 3.0 and requested version should lie between 2.0 included to 3.0 excluded.
Thanks,
Nupur