Hi Pradeep, You can use the pseudo-code from the below link to re-write in salesforce apex http://www.itprojects.co.in/java30-s22new.php
Recommend reviewing Apex module from trailhead: https://trailhead.salesforce.com/content/learn/modules/apex_database/apex_database_intro
Salesforce community can help if you can specify where you are stuck while implementing. If this information helps, please mark the answer as best. Thank you
You can use the pseudo-code from the below link to re-write in salesforce apex
http://www.itprojects.co.in/java30-s22new.php
Recommend reviewing Apex module from trailhead: https://trailhead.salesforce.com/content/learn/modules/apex_database/apex_database_intro
Salesforce community can help if you can specify where you are stuck while implementing. If this information helps, please mark the answer as best. Thank you