Thanks you so much for the reply. Attached my code snippet (.java file) which is failing to do and also attaching the error snap.
Regards,
Anjana