Concepts or coding lessons of Salesforce that you can implement easily

How to convert 15 to 18 digit Id using apex in Salesforce?

Here is the simple way to convert Salesforce 15 digit ID into 18 digit:

String fifteenDigit = '500i0000006oHua'; // Your 15 digit salesforce Id
Id eighteenDigit = fifteenDigit;        
System.debug('15 Digit Id is => ' + fifteenDigit);
System.debug('18 Digit Id is => ' + eighteenDigit);

Output:

15 Digit Id is 500i0000006oHua
18 Digit Id is 500i0000006oHuaAAE



Read More: Which Salesforce API Do I Use in Integration?
                    When To Use Salesforce REST API  
                   When To Use Salesforce SOAP API 
                   When To Use Salesforce Bulk API 
                   When To Use Salesforce Chatter API