tag:blogger.com,1999:blog-9136005568794400432024-03-29T08:59:52.516+05:30Computer Revolution (www.comrevo.com)Parag Jambhulkarhttp://www.blogger.com/profile/13991750622483538113noreply@blogger.comBlogger641125tag:blogger.com,1999:blog-913600556879440043.post-48354393771853763832024-02-08T13:08:00.002+05:302024-02-08T13:09:10.543+05:30SOQL Aggregate Functions in Apex Programming Language | Salesforce Development<p><span style="font-size: large;"> <span> </span></span></p><p><span style="font-size: large;"> <span> In this post, we will see SOQL Aggregate Functions in Apex Programming Language | Salesforce Development </span></span></p><p><span><span style="font-size: large;"></span></span></p><a name='more'></a><p><span style="font-size: large;"><b>Program Code 1 (Anonymous Window)</b>: </span></p><p></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">//Without Aliases</span></p><p><span style="font-size: large;">AggregateResult[] records=[SELECT LeadSource, AVG(Amount), MAX(Amount) FROM Opportunity GROUP BY LeadSource];</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">for(AggregateResult record: records)</span></p><p><span style="font-size: large;">{</span></p><p><span style="font-size: large;"> System.debug('Lead Source:'+record.get('LeadSource')+' Avg Amount: '+record.get('expr0')+' Max Amount: '+record.get('expr1'));</span></p><p><span style="font-size: large;">} </span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"><b>Program Code 2 (Anonymous Window)</b>: </span></p><p></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">//With Aliases</span></p><p><span style="font-size: large;">AggregateResult[] records=[SELECT LeadSource, AVG(Amount) avgamount, MAX(Amount) maxamount FROM Opportunity GROUP BY LeadSource];</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">for(AggregateResult record: records)</span></p><p><span style="font-size: large;">{</span></p><p><span style="font-size: large;"> System.debug('Lead Source:'+record.get('LeadSource')+' Avg Amount: '+record.get('avgamount')+' Max Amount: '+record.get('maxamount'));</span></p><p><span style="font-size: large;">}</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"><b>Program Code 3 (Anonymous Window)</b>: </span></p><p></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">//SOQL For Loop</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">for(AggregateResult record: [SELECT LeadSource, AVG(Amount) avgamount, MAX(Amount) maxamount FROM Opportunity GROUP BY LeadSource])</span></p><p><span style="font-size: large;">{</span></p><p><span style="font-size: large;"> System.debug('Lead Source:'+record.get('LeadSource')+' Avg Amount: '+record.get('avgamount')+' Max Amount: '+record.get('maxamount'));</span></p><p><span style="font-size: large;">}</span></p>Parag Jambhulkarhttp://www.blogger.com/profile/13991750622483538113noreply@blogger.com0tag:blogger.com,1999:blog-913600556879440043.post-1241135406341536652023-11-28T15:31:00.001+05:302023-11-28T15:32:19.656+05:30Learn & Get Udemy Certificate for course "Learn Salesforce (Admin+ Developer) with LWC Live Project"<p> <span style="font-size: large;"> </span> <span style="font-size: large;"> Learn & Get Udemy Certificate for course "Learn Salesforce (Admin+ Developer) with LWC Live Project".</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"><u>Check following link:</u></span></p><p><span style="font-size: large;"><a href="https://www.udemy.com/course/learn-salesforce-admin-developer-with-lwc-live-project/?referralCode=B4FC77F9896FC0D472B4" target="_blank">https://www.udemy.com/course/learn-salesforce-admin-developer-with-lwc-live-project/?referralCode=B4FC77F9896FC0D472B4</a><br /></span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">Watch following video:</span></p>
<iframe width="640" height="360" src="https://www.youtube.com/embed/2B2If5uxCkM" title="Learn & Get Udemy Certificate for course "Learn Salesforce (Admin+ Developer) with LWC Live Project"" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>Parag Jambhulkarhttp://www.blogger.com/profile/13991750622483538113noreply@blogger.com0tag:blogger.com,1999:blog-913600556879440043.post-51562411574793539662023-04-05T23:40:00.005+05:302023-04-05T23:45:21.724+05:30Exception Handling in Apex Part 4 | How to create User Defined Exception Class in Apex<p><span style="font-family: inherit; font-size: large;"> <span> </span><span>In this post, we will see </span><span>Exception Handling in Apex Part 4 | How to create User Defined Exception Class in Apex</span></span></p><p><span style="font-family: inherit; font-size: large;"></span></p><a name='more'></a><span style="font-family: inherit; font-size: large;"><br /></span><p></p><p><span style="font-family: inherit; font-size: large;"><b>Program Code: (class NewException)</b></span></p><p><span style="font-family: inherit; font-size: large;">public class NewException extends Exception {</span></p><p><span style="font-family: inherit; font-size: large;"> override public String getMessage()</span></p><p><span style="font-family: inherit; font-size: large;"> {</span></p><p><span style="font-family: inherit; font-size: large;"> return 'divide by zero exception';</span></p><p><span style="font-family: inherit; font-size: large;"> }</span></p><p><span style="font-family: inherit; font-size: large;"></span></p><p><span style="font-family: inherit; font-size: large;">}</span></p><p><span style="font-family: inherit; font-size: large;"><br /></span></p><p><span style="font-family: inherit; font-size: large;"><b>Program Code: (Anonymous Window)</b></span></p><p><span style="font-family: inherit; font-size: large;">System.debug('Before Exception');</span></p><p><span style="font-family: inherit; font-size: large;">integer a=10,b=0;</span></p><p><span style="font-family: inherit; font-size: large;">try{</span></p><p><span style="font-family: inherit; font-size: large;"> if(b==0)</span></p><p><span style="font-family: inherit; font-size: large;"> throw new NewException();</span></p><p><span style="font-family: inherit; font-size: large;"> else</span></p><p><span style="font-family: inherit; font-size: large;"> Double result=a/b;</span></p><p><span style="font-family: inherit; font-size: large;">}</span></p><p><span style="font-family: inherit; font-size: large;">catch(NewException e){</span></p><p><span style="font-family: inherit; font-size: large;"> System.debug('Cause:'+e.getCause());</span></p><p><span style="font-family: inherit; font-size: large;"> System.debug('Message:'+e.getMessage());</span></p><p><span style="font-family: inherit; font-size: large;"> System.debug('Line Number:'+e.getLineNumber());</span></p><p><span style="font-family: inherit; font-size: large;"> System.debug('Stack Trace:'+e.getStackTraceString());</span></p><p><span style="font-family: inherit; font-size: large;"> System.debug('Type Name:'+e.getTypeName());</span></p><p><span style="font-family: inherit; font-size: large;">} </span></p><p><span style="font-family: inherit; font-size: large;">finally{</span></p><p><span style="font-family: inherit; font-size: large;"> System.debug('In Finally Block');</span></p><p><span style="font-family: inherit; font-size: large;">}</span></p><p></p><p><span style="font-family: inherit; font-size: large;">System.debug('After Exception');</span></p>Parag Jambhulkarhttp://www.blogger.com/profile/13991750622483538113noreply@blogger.com0tag:blogger.com,1999:blog-913600556879440043.post-64258046140621465342023-04-03T23:52:00.004+05:302023-04-03T23:53:09.137+05:30Exception Handling in Apex Part 3 | Common Exception Methods in Apex | Salesforce Development<p> <span style="font-size: large;"> In this post, we will see Exception Handling in Apex Part 3 | Common Exception Methods in Apex | Salesforce Development </span></p><p><span></span></p><a name='more'></a><span style="font-size: large;"><br /></span><p></p><p><span style="font-size: large;"><b>Program Code</b>: </span></p><p><span style="font-size: large;">System.debug('Before Exception');</span></p><p><span style="font-size: large;">try{</span></p><p><span style="font-size: large;">Double result=10/0;</span></p><p><span style="font-size: large;">}</span></p><p><span style="font-size: large;">catch(MathException e){</span></p><p><span style="font-size: large;"> System.debug('Cause:'+e.getCause());</span></p><p><span style="font-size: large;"> System.debug('Message:'+e.getMessage());</span></p><p><span style="font-size: large;"> System.debug('Line Number:'+e.getLineNumber());</span></p><p><span style="font-size: large;"> System.debug('Stack Trace:'+e.getStackTraceString());</span></p><p><span style="font-size: large;"> System.debug('Type Name:'+e.getTypeName());</span></p><p><span style="font-size: large;">} </span></p><p><span style="font-size: large;">finally{</span></p><p><span style="font-size: large;"> System.debug('In Finally Block');</span></p><p><span style="font-size: large;">}</span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;">System.debug('After Exception');</span></p>Parag Jambhulkarhttp://www.blogger.com/profile/13991750622483538113noreply@blogger.com0tag:blogger.com,1999:blog-913600556879440043.post-36252264923337873882023-04-02T22:36:00.006+05:302023-04-02T22:46:56.449+05:30Exception Handling in Apex Part 2 | Try, Catch, Finally Block<p><span style="font-family: inherit;"> <span style="font-size: large;"> In this post, we will see Exception Handling in Apex Part 2 | Try, Catch, Finally Block.</span></span></p><p><span style="font-family: inherit;"><span></span></span></p><a name='more'></a><span style="font-family: inherit;"><span style="font-size: large;"><br /></span></span><p></p><p><span style="font-family: inherit; font-size: large;"><b>Program Code</b>:</span></p><p><span style="font-family: inherit; font-size: large;">System.debug('Before Exception');</span></p><p><span style="font-family: inherit; font-size: large;">try{</span></p><p><span style="font-family: inherit; font-size: large;">Double result=10/2;</span></p><p><span style="font-family: inherit; font-size: large;">}</span></p><p><span style="font-family: inherit; font-size: large;">catch(NullPointerException e){</span></p><p><span style="font-family: inherit; font-size: large;"> System.debug(e);</span></p><p><span style="font-family: inherit; font-size: large;">} </span></p><p><span style="font-family: inherit; font-size: large;">catch(MathException e){</span></p><p><span style="font-family: inherit; font-size: large;"> System.debug(e);</span></p><p><span style="font-family: inherit; font-size: large;">} </span></p><p><span style="font-family: inherit; font-size: large;">catch(Exception e){</span></p><p><span style="font-family: inherit; font-size: large;"> System.debug(e);</span></p><p><span style="font-family: inherit; font-size: large;">} </span></p><p><span style="font-family: inherit; font-size: large;">finally{</span></p><p><span style="font-family: inherit; font-size: large;"> System.debug('In Finally Block');</span></p><p><span style="font-family: inherit; font-size: large;">}</span></p><p><span style="font-family: inherit; font-size: large;"></span></p><p><span style="font-family: inherit; font-size: large;">System.debug('After Exception');</span></p>Parag Jambhulkarhttp://www.blogger.com/profile/13991750622483538113noreply@blogger.com0tag:blogger.com,1999:blog-913600556879440043.post-75131152364023231632023-03-31T00:18:00.002+05:302023-03-31T09:40:25.337+05:30Exception Handling in Apex Part 1<p><span style="font-family: inherit; font-size: large;"> In this post, we will see Exception Handling in Apex Programming Language.</span></p><p><span><span style="font-family: inherit; font-size: large;"></span></span></p><a name='more'></a><p></p><p class="MsoNormal"><span style="font-family: inherit; font-size: large;"><b><span style="line-height: 107%;">Exception</span></b><span style="line-height: 107%;">:<o:p></o:p></span></span></p><p>
<span style="font-family: inherit; font-size: large;"><span style="line-height: 107%;">An </span><em>exception</em> is an event, which occurs during the execution of a
program, that disrupts the normal flow of the program's instructions.</span></p><p><span style="font-family: inherit; font-size: large;"><br /></span></p><p><span style="font-family: inherit; font-size: large;"><b>Program Code:</b></span></p><p><span style="font-family: inherit; font-size: large;">//Math Exception</span></p><p><span style="font-family: inherit; font-size: large;">Double result=10/0;</span></p><p><span style="font-family: inherit; font-size: large;">System.debug('Result='+result);</span></p><p><span style="font-family: inherit; font-size: large;"><br /></span></p><p><span style="font-family: inherit; font-size: large;">//DML Exception</span></p><p><span style="font-family: inherit; font-size: large;">Student__c record=new Student__c();</span></p><p><span style="font-family: inherit; font-size: large;">insert record;</span></p><p><span style="font-family: inherit; font-size: large;"><br /></span></p><p><span style="font-family: inherit; font-size: large;">//Null Pointer Exception</span></p><p><span style="font-family: inherit; font-size: large;">String str;</span></p><p><span style="font-family: inherit; font-size: large;">System.debug(str.toLowerCase());</span></p><p><span style="font-family: inherit; font-size: large;"><br /></span></p><p><span style="font-family: inherit; font-size: large;"></span></p><p><span style="font-family: inherit; font-size: large;">throw new NullPointerException();</span></p>Parag Jambhulkarhttp://www.blogger.com/profile/13991750622483538113noreply@blogger.com0tag:blogger.com,1999:blog-913600556879440043.post-43842592181202242982023-03-07T19:34:00.006+05:302023-03-07T19:35:04.346+05:30How To Run SOQL Queries in Apex Programming Language | SOQL in Apex | Salesforce Development <p><span style="font-size: large;"> <span> In this post, we will see How To Run SOQL Queries in Apex Programming Language | SOQL in Apex | Salesforce Development </span></span></p><p><span><span style="font-size: large;"></span></span></p><a name='more'></a><span style="font-size: large;"><b>Program Code (Anonymous Window)</b>: </span><p></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">List<Student__c> records=[SELECT Id, Name, Roll_Number__c, Dept__c FROM Student__c];</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">for(Student__c record:records)</span></p><p><span style="font-size: large;">{</span></p><p><span style="font-size: large;"> System.debug('Name:'+record.Name+' Roll No.'+record.Roll_Number__c);</span></p><p><span style="font-size: large;">}</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">Map<ID,Student__c> recordsMap=new Map<ID,Student__c>([SELECT Id, Name, Roll_Number__c, Dept__c FROM Student__c]);</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">for(Student__c record:recordsMap.values())</span></p><p><span style="font-size: large;">{</span></p><p><span style="font-size: large;"> System.debug('Name:'+record.Name+' Roll No.'+record.Roll_Number__c);</span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;">}</span></p>Parag Jambhulkarhttp://www.blogger.com/profile/13991750622483538113noreply@blogger.com0tag:blogger.com,1999:blog-913600556879440043.post-46155524864563222452023-02-08T21:27:00.035+05:302024-01-27T20:14:31.576+05:30Basic SOQL Queries<p><span style="font-size: large;"> </span></p><p><span style="font-size: large;"><span> In this post (tutorial), we will see basic SOQL queries which we need for database operations in Salesforce. </span><br /><br /></span></p><a name='more'></a><p><span style="font-size: large;"> </span></p><p><span style="font-size: large;"><b>1. SELECT</b> </span></p><p><span style="font-size: large;"><b>Syntax:</b></span></p><p><span style="font-size: large;"><span>SELECT Field 1, Field 2,....Field n</span><span> FROM Object</span></span></p><p><span style="font-size: large;"><b>e.g.</b> </span></p><p><span style="font-size: large;">SELECT Id, Name, Roll_Number__c, Dept__c FROM Student__c</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">SELECT Id, LastName, FirstName, Name, Title, Company, Street, State, City, PostalCode, Country FROM Lead</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"><b>2. WHERE</b></span></p><p><span style="font-size: large;"><b>Syntax:</b></span></p><p><span style="font-size: large;"><span>SELECT Field 1, Field 2,....Field n</span><span> FROM Object </span></span></p><p><span style="font-size: large;">WHERE Field=Value</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"><b>e.g.</b></span></p><p><span style="font-size: large;">SELECT Id, Name, Roll_Number__c, Dept__c, Contact__c, College__c FROM Student__c </span></p><p></p><p><span style="font-size: large;">WHERE Dept__c='CE'</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">SELECT Id, Name, Roll_Number__c, Dept__c, Contact__c, College__c FROM Student__c </span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;">WHERE Roll_Number__c=37</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"><b>3. AND</b></span></p><p><span style="font-size: large;"><b>Syntax:</b></span></p><p><span style="font-size: large;"><span>SELECT Field 1, Field 2,....Field n</span><span> FROM Object </span></span></p><p><span style="font-size: large;">WHERE Field1=Value1 AND Field2=Value2</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"><b>e.g.</b></span></p><p><span style="font-size: large;"><span> </span><span>SELECT Id, Name, Roll_Number__c, Dept__c, Contact__c, College__c FROM Student__c</span></span></p><p><span style="font-size: large;">WHERE Roll_Number__c=32 AND Dept__c='CE'</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"><b>4. OR</b></span></p><p><span style="font-size: large;"><b>Syntax:</b></span></p><p><span style="font-size: large;"><span>SELECT Field 1, Field 2,....Field n</span><span> FROM Object </span></span></p><p><span style="font-size: large;">WHERE Field1=Value1 OR Field2=Value2</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"><b>e.g. </b></span></p><p><span style="font-size: large;">SELECT Id, Name, Roll_Number__c, Dept__c, Contact__c, College__c FROM Student__c</span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;">WHERE Roll_Number__c=32 OR Roll_Number__c=37</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">SELECT Id, Name, Roll_Number__c, Dept__c, Contact__c, College__c FROM Student__c</span></p><p><span style="font-size: large;">WHERE Roll_Number__c=32 OR Dept__c='ENTC'</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">SELECT Id, Name, Roll_Number__c, Dept__c, Contact__c, College__c FROM Student__c</span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;">WHERE Roll_Number__c=32 OR Dept__c='ENTC' OR Dept__c='IT'</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"><b>Combination of AND, OR</b></span></p><p><span style="font-size: large;">e.g. </span></p><p><span style="font-size: large;">SELECT Id, Name, Roll_Number__c, Dept__c, Contact__c, College__c FROM Student__c</span></p><p><span style="font-size: large;">WHERE Roll_Number__c=32 AND (Dept__c='CE' OR Dept__c='IT') </span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"><b>5. IN</b></span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;"><b>Syntax: </b></span></p><p><span style="font-size: large;"><span>SELECT Field 1, Field 2,....Field n</span><span> FROM Object </span></span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;">WHERE Field IN (Value1, Value2,......, Value n)</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"><b>e.g.</b></span></p><p><span style="font-size: large;">SELECT Id, Name, Roll_Number__c, Dept__c, Contact__c, College__c FROM Student__c</span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;">WHERE Roll_Number__c IN (32,37)</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">SELECT Id, Name, Roll_Number__c, Dept__c, Contact__c, College__c FROM Student__c</span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;">WHERE Dept__c IN ('CE','IT')</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"><b>6. LIKE</b></span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;"><span style="font-weight: bold;"> </span><span style="font-weight: bold;"> </span><span style="font-weight: bold;"> </span><span style="font-weight: bold;"> </span><b> LIKE</b> keyword provides a mechanism for matching partial text strings.</span></p><p><span style="font-size: large;"><span style="font-weight: bold;"> </span><span style="font-weight: bold;"> </span><span style="font-weight: bold;"> </span><span style="font-weight: bold;"> </span><span style="font-weight: bold;"> </span><b> </b>It supports two wildcards <b>%</b> and <b>_</b>.</span></p><p><span style="font-size: large;">i. <b>%</b> stands for occurrence of zero or more characters.</span></p><p><span style="font-size: large;">ii. <b>_</b> stands for occurance of exactly one character.<b> </b><span style="font-weight: bold;"> </span><br /></span></p><p><span style="font-size: large;"><b><br /></b></span></p><p><span style="font-size: large;"><b>Syntax:</b></span></p><p><span style="font-size: large;"><span>SELECT Field 1, Field 2,....Field n</span><span> FROM Object </span></span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;">WHERE Field LIKE 'String%'</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"><span>SELECT Field 1, Field 2,....Field n</span><span> FROM Object </span></span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;">WHERE Field LIKE '%String'</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"><span>SELECT Field 1, Field 2,....Field n</span><span> FROM Object </span></span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;">WHERE Field LIKE '%String%'</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"><b>e.g.</b> </span></p><p><span style="font-size: large;">SELECT Id, FirstName, Name, Company, Status FROM Lead</span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;">WHERE Status LIKE 'Working%'</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">SELECT Id, FirstName, Name, Company, Status FROM Lead</span></p><p><span style="font-size: large;">WHERE Status LIKE '%Contacted'</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">SELECT Id, FirstName, Name, Company, Status FROM Lead</span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;">WHERE Status LIKE '%Not%' </span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"><b>7. ORDER By</b></span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;"><span style="font-weight: bold;"> </span><span style="font-weight: bold;"> </span><span style="font-weight: bold;"> </span><span style="font-weight: bold;"> </span><b> ORDER BY</b> keyword shows the records in an order. By default, records are in ascending order.</span></p><p><span style="font-size: large;"><span><span> </span><span> </span><span> </span><span> </span><span> </span><span> We can also show records in descending order by keyword</span></span><b> DESC</b><span>.</span></span></p><p><span style="font-size: large;"><span><span> </span><span> </span><span> </span><span> </span><span> </span><span> Keyword</span></span><b> ASC</b><span> shows records in ascending order.</span></span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"><b>Syntax:</b></span></p><p><span style="font-size: large;"><span>SELECT Field 1, Field 2,....Field n</span><span> FROM Object</span></span></p><p><span style="font-size: large;">ORDER BY field_name;</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"><span>SELECT Field 1, Field 2,....Field n</span><span> FROM Object</span></span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;">ORDER BY field_name DESC;</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"><span>SELECT Field 1, Field 2,....Field n</span><span> FROM Object</span></span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;">ORDER BY field_name ASC;</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"><b>e.g.</b></span></p><p><span style="font-size: large;">SELECT Id, FirstName, Name, Company, Status FROM Lead</span></p><p></p><p><span style="font-size: large;">ORDER BY Name</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">SELECT Id, FirstName, Name, Company, Status FROM Lead</span></p><p></p><p><span style="font-size: large;">ORDER BY Name DESC</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">SELECT Id, FirstName, Name, Company, Status FROM Lead</span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;">ORDER BY Name ASC </span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"><b>DML (Data Manipulation Language)</b></span></p><p><span style="font-size: large;">1. Insert</span></p><p><span style="font-size: large;">2. Update</span></p><p><span style="font-size: large;">3. Delete</span></p><p><span style="font-size: large;">4. Undelete</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"><b>1. Insert</b></span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">e.g. </span></p><p><span style="font-size: large;">//College__c record=new College__c(Name='WCE', College_ID__c=5000, City__c='WCE');</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">//insert record;</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">College__c record1=new College__c(Name='WCE1', College_ID__c=5000, City__c='WCE');</span></p><p><span style="font-size: large;">College__c record2=new College__c(Name='WCE2', College_ID__c=5000, City__c='WCE');</span></p><p><span style="font-size: large;">College__c record3=new College__c(Name='WCE3', College_ID__c=5000, City__c='WCE');</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">List<College__c> records=new List<College__c>();</span></p><p><span style="font-size: large;">records.add(record1);</span></p><p><span style="font-size: large;">records.add(record2);</span></p><p><span style="font-size: large;">records.add(record3);</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">//insert records; //partial success is not allowed</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">Database.insert(records); //partial success is not allowed</span></p><p><span style="font-size: large;">Database.insert(records, true); //partial success is not allowed</span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;">Database.insert(records, false); //partial success is allowed</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"><b>2. Update</b></span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">e.g. </span></p><p><span style="font-size: large;">List<College__c> records=[SELECT Name, College_ID__c, City__c FROM College__c WHERE Name LIKE 'WCE%'];</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">for(College__c record : records)</span></p><p><span style="font-size: large;">{</span></p><p><span style="font-size: large;"> record.City__c='Sangli';</span></p><p><span style="font-size: large;">}</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">//update records; //partial success is not allowed</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;">Database.update(records, false); //partial success is allowed </span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"><b>3. Delete</b></span></p><p><span style="font-size: large;">e.g.</span></p><p><span style="font-size: large;">List<College__c> records= [SELECT Name, College_ID__c,City__c FROM College__c WHERE Name='WCE'];</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">//delete records; //partial success is not allowed</span></p><p><span style="font-size: large;"><br /></span></p><p></p><p><span style="font-size: large;">Database.delete(records, false); //partial success is allowed </span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"><b>4. Undelete</b></span></p><p><span style="font-size: large;">e.g.</span></p><p><span style="font-size: large;">List<College__c> deletedRecords= [SELECT Id, Name, College_ID__c,City__c FROM College__c WHERE isDeleted=true ALL ROWS];</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">undelete deletedRecords; //partial success is not allowed</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;">//Database.undelete(deletedRecords, false); //partial success is allowed</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"><b><u>Aggregate Functions</u>:</b></span></p><p><span style="font-size: large;"><span style="font-weight: bold;"> </span><b> </b>Aggregate functions in SOQL allow to roll up and summarize the data in a query.</span></p><p><span style="font-size: large;"><b>AVG()</b> – Returns the average value of a numeric field</span></p><p><span style="font-size: large;"><b>MIN()</b> – Returns the minimum value of a field</span></p><p><span style="font-size: large;"><b>MAX()</b> – Returns the maximum value of a field</span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;"><b>SUM()</b> – Returns the total sum of a numeric field </span></p><p><span style="font-size: large;"><b>COUNT()</b> – Returns the number of rows matching the query criteria </span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"> <b>GROUP BY</b> clause helps aggregate functions to work on group of similar records instead of individual records.<br /></span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"><span> </span><span> We</span> can use a <b>HAVING</b> clause with a <b>GROUP BY</b> clause to filter the results returned by aggregate functions. </span></p><p><span style="font-size: large;"><span> </span><span> </span>The <u>HAVING</u> clause is similar to a <u>WHERE</u> clause. The difference is that you can include aggregate functions in a <u>HAVING</u> clause, but not in a <u>WHERE</u> clause.</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"><b>1. AVG()</b></span></p><p><span style="font-size: large;"><span style="font-weight: bold;"> </span>Returns the average value of a numeric field.</span></p><p><span style="font-size: large;">e.g. 1</span></p><p><span style="font-size: large;"><span>SELECT AVG(Amount) </span>FROM Opportunity</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">e.g. 2</span></p><p><span style="font-size: large;"><span>SELECT LeadSource, AVG(Amount) </span>FROM Opportunity GROUP BY LeadSource</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">e.g. 3</span></p><p><span style="font-size: large;">SELECT LeadSource, AVG(Amount) FROM Opportunity GROUP BY LeadSource HAVING AVG(Amount)>=100000</span></p><p><b><span style="font-size: large;"><br /></span></b></p><p><b><span style="font-size: large;">2. SUM() </span></b></p><p><span style="font-size: large;"><b><span> </span></b><span>Returns the total sum of a numeric field.</span></span></p><p><span style="font-size: large;">e.g. 1</span></p><p><span style="font-size: large;"><span>SELECT SUM(Amount) </span>FROM Opportunity</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">e.g. 2</span></p><p><span style="font-size: large;"><span>SELECT LeadSource, SUM(Amount) </span>FROM Opportunity GROUP BY LeadSource</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">e.g. 3</span></p><p><span style="font-size: large;">SELECT LeadSource, SUM(Amount) FROM Opportunity GROUP BY LeadSource HAVING SUM(Amount)>=100000</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"><b>3. MIN()</b></span></p><p><span style="font-size: large;"><b><span> </span></b>Returns the minimum value of a field.</span></p><p><span style="font-size: large;">e.g. 1</span></p><p><span style="font-size: large;"><span>SELECT MIN(Amount) </span>FROM Opportunity</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">e.g. 2</span></p><p><span style="font-size: large;"><span>SELECT LeadSource, MIN(Amount) </span>FROM Opportunity GROUP BY LeadSource</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">e.g. 3</span></p><p><span style="font-size: large;">SELECT LeadSource, MIN(Amount) FROM Opportunity GROUP BY LeadSource HAVING MIN(Amount)>=100000</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"><b>4. MAX()</b></span></p><p><span style="font-size: large;"><b><span> </span></b>Returns the maximum value of a field.</span></p><p><span style="font-size: large;">e.g.</span></p><p><span style="font-size: large;">e.g. 1</span></p><p><span style="font-size: large;"><span>SELECT MAX(Amount) </span>FROM Opportunity</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">e.g. 2</span></p><p><span style="font-size: large;"><span>SELECT LeadSource, MAX(Amount) </span>FROM Opportunity GROUP BY LeadSource</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">e.g. 3</span></p><p><span style="font-size: large;">SELECT LeadSource, MAX(Amount) FROM Opportunity GROUP BY LeadSource HAVING MAX(Amount)>=100000</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"><b>6. COUNT()</b></span></p><p><span style="font-size: large;"><b><span> </span></b>Returns the number of rows matching the query criteria.</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">e.g. 1</span></p><p><span style="font-size: large;"><span>SELECT COUNT() </span>FROM Opportunity</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">e.g. 2</span></p><p><span style="font-size: large;"><span>SELECT COUNT() </span>FROM Opportunity WHERE LeadSource='Word of mouth'</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">e.g. 3 </span></p><p><span style="font-size: large;"><span>SELECT COUNT() </span>FROM Account WHERE Name LIKE 'p%'</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"><b>7. COUNT(fieldName)</b></span></p><p><span style="font-size: large;"><b><span> </span></b>Returns the number of rows matching the query criteria.</span></p><p><span style="font-size: large;">e.g. 1</span></p><p><span style="font-size: large;"><span>SELECT COUNT(LeadSource) </span>FROM Opportunity</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">e.g. 2</span></p><p><span style="font-size: large;"><span>SELECT LeadSource, COUNT(Amount) </span>FROM Opportunity GROUP BY LeadSource</span></p><div><span style="font-size: large;"><br /></span></div><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">e.g. 3</span></p><p><span style="font-size: large;">SELECT LeadSource, COUNT(Amount) FROM Opportunity GROUP BY LeadSource HAVING COUNT(Amount)>=100000</span></p><div><span style="font-size: large;"><br /></span></div><div><span style="font-size: large;"><br /></span></div><p><span style="font-size: large;"><b>8. COUNT_DISTINCT()</b></span></p><div><span style="font-size: large;"><span> </span>Returns the number of distinct non-null field values matching the query criteria.</span></div><div><span style="font-size: large;"><br /></span></div><div><span style="font-size: large;">e.g. 1</span></div><div><span style="font-size: large;"><div>SELECT COUNT_DISTINCT(Company) FROM Lead </div><div><br /></div><div><p><span style="font-size: large;">e.g. 2</span></p><p><span style="font-size: large;">SELECT COUNT_DISTINCT(LeadSource) </span>FROM Opportunity</p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">e.g. 3</span></p><p><span style="font-size: large;">SELECT </span><span>COUNT_DISTINCT</span><span style="font-size: large;">(LeadSource) </span>FROM Opportunity WHERE LeadSource='External Referral'</p></div><div><span><br /></span></div></span></div><p><span style="font-size: large;"></span></p><div class="separator" style="clear: both; text-align: center;"><span style="font-size: large;"><br /></span></div><span style="font-size: large;"><br /><br /></span><p></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"><br /></span></p><p></p><p><span style="font-size: large;"><br /></span></p><div><span style="font-size: large;"><br /></span></div><p><span style="font-size: large;"><br /></span></p><div><span style="font-size: large;"><br /></span></div><p><span style="font-size: large;"><br /></span><br /></p>Parag Jambhulkarhttp://www.blogger.com/profile/13991750622483538113noreply@blogger.com0tag:blogger.com,1999:blog-913600556879440043.post-18221575010894365532023-01-10T00:07:00.006+05:302023-01-10T00:07:44.869+05:30Apex break continue Statements | Jumping Statements in Apex | break | continue<p> <span style="font-size: large;"> In this post, we will see Apex break continue Statements | Jumping Statements in Apex | break | continue </span></p><p><span></span></p><a name='more'></a><span style="font-size: large;"><b><br /></b></span><p></p><p><span style="font-size: large;"><b>Program Code: (Anonymous Window)</b></span></p><p><span style="font-size: large;">for(integer i=0;i<5;i++)</span></p><p><span style="font-size: large;">{</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">for(integer j=0;j<5;j++)</span></p><p><span style="font-size: large;">{</span></p><p><span style="font-size: large;"> if(j==3)</span></p><p><span style="font-size: large;"> break;</span></p><p><span style="font-size: large;"><span> </span><span> //continue;</span><br /></span></p><p><span style="font-size: large;"> system.debug('Value of i='+i+' Value of j='+j);</span></p><p><span style="font-size: large;">}</span></p><p><span style="font-size: large;"> </span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;">}</span></p>Parag Jambhulkarhttp://www.blogger.com/profile/13991750622483538113noreply@blogger.com0tag:blogger.com,1999:blog-913600556879440043.post-20215192993908156232023-01-08T22:22:00.002+05:302023-01-08T22:22:13.452+05:30Apex List or Set Iteration for Loops | For Each Loop | Enhanced or Range Based For Loop | Salesforce<p> <span style="font-size: large;"> In this post, we will see Apex List or Set Iteration for Loops | For Each Loop | Enhanced or Range Based For Loop | Salesforce </span></p><p><span></span></p><a name='more'></a><span style="font-size: large;"><br /></span><p></p><p><span style="font-size: large;"><b>Program Code: (Anonymous Window)</b></span></p><p><span style="font-size: large;">/*Array*/</span></p><p><span style="font-size: large;">integer[] myarr=new integer[]{20,10,33,33,31};</span></p><p><span style="font-size: large;">string[] strarr=new string[]{'a','b','c','d','e'}; </span></p><p><span style="font-size: large;"> </span></p><p><span style="font-size: large;">/*list*/</span></p><p><span style="font-size: large;">list<integer> mylist=new list<integer>{20,10,33,33,31}; </span></p><p><span style="font-size: large;"> </span></p><p><span style="font-size: large;">/*set*/ </span></p><p><span style="font-size: large;">set<integer> myset=new set<integer>{20,10,31,33,31}; </span></p><p><span style="font-size: large;"> </span></p><p><span style="font-size: large;">for(integer i : myset) </span></p><p><span style="font-size: large;">{</span></p><p><span style="font-size: large;"> system.debug('Value of i='+i);</span></p><p><span style="font-size: large;">}</span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;"> </span></p>Parag Jambhulkarhttp://www.blogger.com/profile/13991750622483538113noreply@blogger.com0tag:blogger.com,1999:blog-913600556879440043.post-48014036853754931212023-01-08T11:12:00.001+05:302023-01-08T11:12:19.190+05:30Looping Statements in Apex | Loop Structure in Apex in Salesforce | Apex Control Structures Part 4<p> <span style="font-size: large;"> In this post, we will see Looping Statements in Apex | Loop Structure in Apex in Salesforce | Apex Control Structures Part 4 </span></p><p><span></span></p><a name='more'></a><span style="font-size: large;"><br /></span><p></p><p><span style="font-size: large;"><b>Program Code: (Anonymous Window)</b></span></p><p><span style="font-size: large;">/* To print squares of 0 to 4 */</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">/*</span></p><p><span style="font-size: large;">for(integer i=0; i<5; i++)</span></p><p><span style="font-size: large;">{</span></p><p><span style="font-size: large;"><span style="white-space: pre;"> </span>system.debug('Square of '+i+'='+i*i);</span></p><p><span style="font-size: large;">}</span></p><p><span style="font-size: large;">*/</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">/*</span></p><p><span style="font-size: large;">integer i=0;</span></p><p><span style="font-size: large;">while(i<5)</span></p><p><span style="font-size: large;">{</span></p><p><span style="font-size: large;"> system.debug('Square of '+i+'='+i*i);</span></p><p><span style="font-size: large;"> i++;</span></p><p><span style="font-size: large;">}</span></p><p><span style="font-size: large;">*/</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">integer i=0;</span></p><p><span style="font-size: large;">do</span></p><p><span style="font-size: large;">{</span></p><p><span style="font-size: large;"> system.debug('Square of '+i+'='+i*i);</span></p><p><span style="font-size: large;"> i++;</span></p><p><span style="font-size: large;">}</span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;">while(i<5);</span></p><p><span style="font-size: large;"><br /></span></p>Parag Jambhulkarhttp://www.blogger.com/profile/13991750622483538113noreply@blogger.com0tag:blogger.com,1999:blog-913600556879440043.post-65904901837275463442023-01-04T20:17:00.002+05:302023-01-04T20:17:29.447+05:30Switch When Statement in Apex Programming | Switch Case Statement | Apex Control Structures Part 3<p> <span style="font-size: large;"> In this post, we will see Switch When Statement in Apex Programming | Switch Case Statement | Apex Control Structures Part 3</span></p><p><span></span></p><a name='more'></a><span style="font-size: large;"><br /></span><p></p><p><span style="font-size: large;"><b>Program Code (in Anonymous window) :</b></span></p><p><span style="font-size: large;">string var='b';</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">switch on var</span></p><p><span style="font-size: large;">{</span></p><p><span style="font-size: large;"> when 'a'</span></p><p><span style="font-size: large;"> {</span></p><p><span style="font-size: large;"> system.debug('Apple');</span></p><p><span style="font-size: large;"> }</span></p><p><span style="font-size: large;"> when 'b'</span></p><p><span style="font-size: large;"> {</span></p><p><span style="font-size: large;"> system.debug('Banana');</span></p><p><span style="font-size: large;"> }</span></p><p><span style="font-size: large;"> when 'c'</span></p><p><span style="font-size: large;"> {</span></p><p><span style="font-size: large;"> system.debug('Cat');</span></p><p><span style="font-size: large;"> }</span></p><p><span style="font-size: large;"> when else</span></p><p><span style="font-size: large;"> {</span></p><p><span style="font-size: large;"> system.debug('Invalid');</span></p><p><span style="font-size: large;"> }</span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;">}</span></p>Parag Jambhulkarhttp://www.blogger.com/profile/13991750622483538113noreply@blogger.com0tag:blogger.com,1999:blog-913600556879440043.post-15586464288523611632023-01-02T23:25:00.003+05:302023-01-08T11:15:12.215+05:30Apex Control Structures Part 1 : Introduction | Salesforce Development<p><span style="font-size: large;"> <span> In this video, we will see Apex Control Structures Part 1 : Introduction | Salesforce Development. </span></span></p><p><span style="font-size: large;"></span></p><a name='more'></a><span style="font-size: large;"><br /></span><p></p><p></p><p align="center" class="MsoNormal" style="text-align: center;"><b><span style="font-size: large; line-height: 107%;">Control Structures in Apex<o:p></o:p></span></b></p>
<p class="MsoListParagraph" style="margin-left: 38pt; mso-add-space: auto; mso-list: l3 level1 lfo5; text-indent: -20pt;"><span style="font-size: large;"><!--[if !supportLists]--><span style="font-family: Wingdings; line-height: 107%; mso-bidi-font-family: Wingdings; mso-bidi-font-weight: bold; mso-fareast-font-family: Wingdings;"><span style="mso-list: Ignore;">è<span style="font-family: "Times New Roman"; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></span></span><!--[endif]--><b><span style="line-height: 107%;">These are the structures in programming languages which control the flow
of execution of statements.<o:p></o:p></span></b></span></p>
<p class="MsoNormal" style="margin-left: 18pt;"><b><span style="font-size: large; line-height: 107%;"><o:p> </o:p></span></b></p>
<p class="MsoNormal" style="margin-left: 18pt;"><b><span style="font-size: large; line-height: 107%;">Types of Control Structures<o:p></o:p></span></b></p>
<p class="MsoListParagraphCxSpFirst" style="mso-list: l4 level1 lfo1; text-indent: -18pt;"><span style="font-size: large;"><!--[if !supportLists]--><b><span style="line-height: 107%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">1.<span style="font-family: "Times New Roman"; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span></span></b><!--[endif]--><b><span style="line-height: 107%;">Sequence Structure<o:p></o:p></span></b></span></p>
<p class="MsoListParagraphCxSpMiddle" style="mso-list: l4 level1 lfo1; text-indent: -18pt;"><span style="font-size: large;"><!--[if !supportLists]--><b><span style="line-height: 107%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font-family: "Times New Roman"; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span></span></b><!--[endif]--><b><span style="line-height: 107%;">Selection Structure<o:p></o:p></span></b></span></p>
<p class="MsoListParagraphCxSpLast" style="mso-list: l4 level1 lfo1; text-indent: -18pt;"><span style="font-size: large;"><!--[if !supportLists]--><b><span style="line-height: 107%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">3.<span style="font-family: "Times New Roman"; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span></span></b><!--[endif]--><b><span style="line-height: 107%;">Loop Structure<o:p></o:p></span></b></span></p>
<p class="MsoNormal"><b><span style="font-size: large; line-height: 107%;"><o:p> </o:p></span></b></p>
<p class="MsoListParagraph" style="mso-list: l0 level1 lfo2; text-indent: -18pt;"><span style="font-size: large;"><!--[if !supportLists]--><b><span style="line-height: 107%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">1.<span style="font-family: "Times New Roman"; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span></span></b><!--[endif]--><b><span style="line-height: 107%;">Sequence Structure<o:p></o:p></span></b></span></p>
<p align="center" class="MsoNormal" style="margin-left: 18pt; text-align: center;"><span style="font-size: large;"><span style="mso-no-proof: yes;"><v:shapetype coordsize="21600,21600" filled="f" id="_x0000_t75" o:preferrelative="t" o:spt="75" path="m@4@5l@4@11@9@11@9@5xe" stroked="f">
<v:stroke joinstyle="miter">
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0">
<v:f eqn="sum @0 1 0">
<v:f eqn="sum 0 0 @1">
<v:f eqn="prod @2 1 2">
<v:f eqn="prod @3 21600 pixelWidth">
<v:f eqn="prod @3 21600 pixelHeight">
<v:f eqn="sum @0 0 1">
<v:f eqn="prod @6 1 2">
<v:f eqn="prod @7 21600 pixelWidth">
<v:f eqn="sum @8 21600 0">
<v:f eqn="prod @7 21600 pixelHeight">
<v:f eqn="sum @10 21600 0">
</v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:formulas>
<v:path gradientshapeok="t" o:connecttype="rect" o:extrusionok="f">
<o:lock aspectratio="t" v:ext="edit">
</o:lock></v:path></v:stroke></v:shapetype><v:shape id="Picture_x0020_1" o:spid="_x0000_i1028" style="height: 301.5pt; mso-wrap-style: square; visibility: visible; width: 74.5pt;" type="#_x0000_t75">
<v:imagedata o:title="" src="file:///C:/Users/parag/AppData/Local/Temp/msohtmlclip1/01/clip_image001.jpg">
</v:imagedata></v:shape></span><b><span style="line-height: 107%;"><o:p></o:p></span></b></span></p>
<p class="MsoNormal" style="margin-left: 18pt;"><b><span style="font-size: large; line-height: 107%;"></span></b></p><div class="separator" style="clear: both; text-align: center;"><b><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhW6LYjQQw1KYO0yQlljAazN4FR8m6TbAflXlaEwtRJtPeXdQFDldFUMkBNSM-I59p2gzhxVQfXv5ovHx7TgmK4X4XdSwJFkGB87XdBnPDo6J_hYms_aTLuFpVhch_ymp7QRUw9_D48Kh4gGW2RAcuyME5B0q8TuPKIW03Mg13qzJopDxK6BwpmG3r1Lg" style="margin-left: 1em; margin-right: 1em;"><span style="font-size: large;"><img alt="" data-original-height="628" data-original-width="155" height="400" src="https://blogger.googleusercontent.com/img/a/AVvXsEhW6LYjQQw1KYO0yQlljAazN4FR8m6TbAflXlaEwtRJtPeXdQFDldFUMkBNSM-I59p2gzhxVQfXv5ovHx7TgmK4X4XdSwJFkGB87XdBnPDo6J_hYms_aTLuFpVhch_ymp7QRUw9_D48Kh4gGW2RAcuyME5B0q8TuPKIW03Mg13qzJopDxK6BwpmG3r1Lg=w99-h400" width="99" /></span></a></b></div><b><span style="font-size: large;"><br /><br /></span></b><p></p><p class="MsoNormal" style="margin-left: 18pt;"><b><span style="font-size: large; line-height: 107%;"><br /></span></b></p><p class="MsoNormal" style="margin-left: 18pt;"><b><span style="font-size: large; line-height: 107%;">e.g.<o:p></o:p></span></b></p>
<p class="MsoNormal" style="margin-left: 18pt;"><b><span style="font-size: large; line-height: 107%;">integer a=3, b=4;<o:p></o:p></span></b></p>
<p class="MsoNormal" style="margin-left: 18pt;"><b><span style="font-size: large; line-height: 107%;">integer c;<o:p></o:p></span></b></p>
<p class="MsoNormal" style="margin-left: 18pt;"><b><span style="font-size: large; line-height: 107%;">c=a+b;<o:p></o:p></span></b></p>
<p class="MsoNormal" style="margin-left: 18pt;"><b><span style="font-size: large; line-height: 107%;">system.debug('Addition:'+c);<o:p></o:p></span></b></p>
<p class="MsoNormal" style="margin-left: 18pt;"><b><span style="font-size: large; line-height: 107%;"><o:p> </o:p></span></b></p>
<p class="MsoListParagraph" style="mso-list: l0 level1 lfo2; text-indent: -18pt;"><span style="font-size: large;"><!--[if !supportLists]--><b><span style="line-height: 107%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font-family: "Times New Roman"; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span></span></b><!--[endif]--><b><span style="line-height: 107%;">Selection Structure<o:p></o:p></span></b></span></p>
<p align="center" class="MsoNormal" style="margin-left: 18pt; text-align: center;"><span style="font-size: large;"><span style="mso-no-proof: yes;"><v:shape id="Picture_x0020_3" o:spid="_x0000_i1027" style="height: 268.5pt; mso-wrap-style: square; visibility: visible; width: 341.5pt;" type="#_x0000_t75">
<v:imagedata o:title="" src="file:///C:/Users/parag/AppData/Local/Temp/msohtmlclip1/01/clip_image002.jpg">
</v:imagedata></v:shape></span><b><span style="line-height: 107%;"><o:p></o:p></span></b></span></p>
<p class="MsoNormal" style="margin-left: 18pt;"><b><span style="font-size: large; line-height: 107%;"><o:p> </o:p></span></b></p><div class="separator" style="clear: both; text-align: center;"><b><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgUXjyUhKNIOOnKn8cfHFmV6jQMnld8IC6Foq8fgDqmUh8DtAF2K39lv6TfC3ZVvpSQZchQrgPodr4onzyybsN9yknJDRYsPISD-tlKj1vjR02eLsjlvra_foYwd5addw8cWFEFrcw-0yvJfqxaIQmHpdghfkst2jYUaVo_1JVHvzkER9hxrg_Aal5B8w" style="margin-left: 1em; margin-right: 1em;"><span style="font-size: large;"><img alt="" data-original-height="559" data-original-width="711" height="314" src="https://blogger.googleusercontent.com/img/a/AVvXsEgUXjyUhKNIOOnKn8cfHFmV6jQMnld8IC6Foq8fgDqmUh8DtAF2K39lv6TfC3ZVvpSQZchQrgPodr4onzyybsN9yknJDRYsPISD-tlKj1vjR02eLsjlvra_foYwd5addw8cWFEFrcw-0yvJfqxaIQmHpdghfkst2jYUaVo_1JVHvzkER9hxrg_Aal5B8w=w400-h314" width="400" /></span></a></b></div><b><span style="font-size: large;"><br /></span></b><p></p>
<p class="MsoNormal" style="margin-left: 18pt;"><b><span style="font-size: large; line-height: 107%;">How is it implemented in Apex?<o:p></o:p></span></b></p>
<p class="MsoListParagraphCxSpFirst" style="mso-list: l2 level1 lfo3; text-indent: -18pt;"><span style="font-size: large;"><!--[if !supportLists]--><b><span style="line-height: 107%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">1.<span style="font-family: "Times New Roman"; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span></span></b><!--[endif]--><b><span style="line-height: 107%;">Simple if<o:p></o:p></span></b></span></p>
<p class="MsoListParagraphCxSpMiddle" style="mso-list: l2 level1 lfo3; text-indent: -18pt;"><span style="font-size: large;"><!--[if !supportLists]--><b><span style="line-height: 107%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font-family: "Times New Roman"; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span></span></b><!--[endif]--><b><span style="line-height: 107%;">If else<o:p></o:p></span></b></span></p>
<p class="MsoListParagraphCxSpMiddle" style="mso-list: l2 level1 lfo3; text-indent: -18pt;"><span style="font-size: large;"><!--[if !supportLists]--><b><span style="line-height: 107%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">3.<span style="font-family: "Times New Roman"; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span></span></b><!--[endif]--><b><span style="line-height: 107%;">Nested if<o:p></o:p></span></b></span></p>
<p class="MsoListParagraphCxSpMiddle" style="mso-list: l2 level1 lfo3; text-indent: -18pt;"><span style="font-size: large;"><!--[if !supportLists]--><b><span style="line-height: 107%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">4.<span style="font-family: "Times New Roman"; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span></span></b><!--[endif]--><b><span style="line-height: 107%;">Else if Ladder<o:p></o:p></span></b></span></p>
<p class="MsoListParagraphCxSpMiddle"><b><span style="font-size: large; line-height: 107%;"><o:p> </o:p></span></b></p><div class="separator" style="clear: both; text-align: center;"><b><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhBs7kkKRY_PMlp9T5Y_JpST-npvfmMrZyn9RImHPpP-sCFC9gPk7HYVHaU8gBUk7qX92OHNKFlSHAa-wFCjOF3UJmZx3RFigJXy9YrnZTA8t1S7vw9rxa06s2XveBrTeHTHLCzMa9bX4epHJuJG8zwdsL14e8hdyChPhnEhKSd9oaveXDzdDFfNM7XUA" style="margin-left: 1em; margin-right: 1em;"><span style="font-size: large;"><img alt="" data-original-height="570" data-original-width="940" height="389" src="https://blogger.googleusercontent.com/img/a/AVvXsEhBs7kkKRY_PMlp9T5Y_JpST-npvfmMrZyn9RImHPpP-sCFC9gPk7HYVHaU8gBUk7qX92OHNKFlSHAa-wFCjOF3UJmZx3RFigJXy9YrnZTA8t1S7vw9rxa06s2XveBrTeHTHLCzMa9bX4epHJuJG8zwdsL14e8hdyChPhnEhKSd9oaveXDzdDFfNM7XUA=w640-h389" width="640" /></span></a></b></div><b><span style="font-size: large;"><br /></span></b><p></p>
<p align="center" class="MsoListParagraphCxSpMiddle" style="text-align: center;"><b><span style="font-size: large; line-height: 107%;"><o:p> </o:p></span></b></p>
<p align="center" class="MsoListParagraphCxSpMiddle" style="text-align: center;"><b><span style="font-size: large; line-height: 107%;"><o:p> </o:p></span></b></p>
<p class="MsoListParagraphCxSpMiddle"><b><span style="font-size: large; line-height: 107%;">How is it implemented in Apex?<o:p></o:p></span></b></p>
<p class="MsoListParagraphCxSpMiddle"><b><span style="font-size: large; line-height: 107%;">By using switch when <o:p></o:p></span></b></p>
<p class="MsoListParagraphCxSpMiddle"><b><span style="font-size: large; line-height: 107%;"><o:p> </o:p></span></b></p>
<p class="MsoListParagraphCxSpMiddle"><span style="font-size: large;"><span style="mso-no-proof: yes;"><v:shape alt="Diagram
Description automatically generated" id="Picture_x0020_2" o:spid="_x0000_i1026" style="height: 273.5pt; mso-wrap-style: square; visibility: visible; width: 451pt;" type="#_x0000_t75">
<v:imagedata o:title="Diagram
Description automatically generated" src="file:///C:/Users/parag/AppData/Local/Temp/msohtmlclip1/01/clip_image003.jpg">
</v:imagedata></v:shape></span><b><span style="line-height: 107%;"><o:p></o:p></span></b></span></p>
<p class="MsoListParagraphCxSpMiddle"><span style="font-size: large;"><b><span style="line-height: 107%;"><o:p> </o:p></span></b><b><span style="line-height: 107%;"><o:p> </o:p></span></b></span></p>
<p class="MsoListParagraphCxSpLast" style="mso-list: l0 level1 lfo2; text-indent: -18pt;"><span style="font-size: large;"><!--[if !supportLists]--><b><span style="line-height: 107%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">3.<span style="font-family: "Times New Roman"; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span></span></b><!--[endif]--><b><span style="line-height: 107%;">Loop Structure<o:p></o:p></span></b></span></p><p class="MsoListParagraphCxSpLast" style="mso-list: l0 level1 lfo2; text-indent: -18pt;"><b><span style="font-size: large; line-height: 107%;"></span></b></p><div class="separator" style="clear: both; text-align: center;"><b><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgXl6Hl8mMQfXCJlfFnWt52pagSaDJk130hbwKSPJYgyWaMsCSQgJdMSNkH1spTpbjpJN_tK_PIS56v0ycYO06V-nUftmflxFOqCudhA3u4OG_H2S6-7-6l416XhLxt0MJeaKPEv2DuDbt3EOfsPloDN5XMYqtDjkJP9M19uWzmyeqaz0rliLbiyCxm9A" style="margin-left: 1em; margin-right: 1em;"><span style="font-size: large;"><img alt="" data-original-height="649" data-original-width="340" height="400" src="https://blogger.googleusercontent.com/img/a/AVvXsEgXl6Hl8mMQfXCJlfFnWt52pagSaDJk130hbwKSPJYgyWaMsCSQgJdMSNkH1spTpbjpJN_tK_PIS56v0ycYO06V-nUftmflxFOqCudhA3u4OG_H2S6-7-6l416XhLxt0MJeaKPEv2DuDbt3EOfsPloDN5XMYqtDjkJP9M19uWzmyeqaz0rliLbiyCxm9A=w209-h400" width="209" /></span></a></b></div><span style="font-size: large;"><b><br /></b><b><span style="line-height: 107%;">How is it implemented in Apex?</span></b></span><p></p>
<p class="MsoListParagraphCxSpFirst" style="mso-list: l1 level1 lfo4; text-indent: -18pt;"><span style="font-size: large;"><!--[if !supportLists]--><b><span style="line-height: 107%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">1.<span style="font-family: "Times New Roman"; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span></span></b><!--[endif]--><b><span style="line-height: 107%;">for<o:p></o:p></span></b></span></p>
<p class="MsoListParagraphCxSpMiddle" style="mso-list: l1 level1 lfo4; text-indent: -18pt;"><span style="font-size: large;"><!--[if !supportLists]--><b><span style="line-height: 107%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font-family: "Times New Roman"; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span></span></b><!--[endif]--><b><span style="line-height: 107%;">while<o:p></o:p></span></b></span></p>
<p class="MsoListParagraphCxSpLast" style="mso-list: l1 level1 lfo4; text-indent: -18pt;"><span style="font-size: large;"><span><!--[if !supportLists]--><b><span style="line-height: 107%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">3.<span style="font-family: "Times New Roman"; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span></span></b><!--[endif]--></span><b><span style="line-height: 107%;"><span>do while</span><o:p></o:p></span></b></span></p><p class="MsoListParagraphCxSpLast" style="mso-list: l1 level1 lfo4; text-indent: -18pt;"><b><span style="line-height: 107%;"><span style="font-size: large;"><br /></span></span></b></p><p class="MsoNormal"><b><span style="line-height: 107%;"><span style="font-size: large;">These looping statements have three major components:</span></span></b></p><p class="MsoNormal"><span style="line-height: 107%;"><span style="font-size: large;">initialization,
(only once)<o:p></o:p></span></span></p><p class="MsoNormal"><span style="line-height: 107%;"><span style="font-size: large;">condition,
(in every iteration)<o:p></o:p></span></span></p><p class="MsoNormal"><span style="line-height: 107%;"><span style="font-size: large;">increment/decrement,
(in every iteration)<b><o:p></o:p></b></span></span></p><p class="MsoNormal"><b><span style="line-height: 107%;"><span style="font-size: large;"> </span></span></b></p><p class="MsoNormal"><b><span style="line-height: 107%;"><span style="font-size: large;">1. for<o:p></o:p></span></span></b></p><p class="MsoNormal"><b><span style="line-height: 107%;"><span style="font-size: large;">Syntax:<o:p></o:p></span></span></b></p><p class="MsoNormal"><span style="line-height: 107%;"><span style="font-size: large;">for(initialization
; condition ; increment/decrement)<o:p></o:p></span></span></p><p class="MsoNormal"><span style="line-height: 107%;"><span style="font-size: large;">{<o:p></o:p></span></span></p><p class="MsoNormal"><span style="line-height: 107%;"><span style="font-size: large;">/*statements*/<o:p></o:p></span></span></p><p class="MsoNormal"><span style="line-height: 107%;"><span style="font-size: large;">}<b> <o:p></o:p></b></span></span></p><p class="MsoNormal"><b><span style="line-height: 107%;"><span style="font-size: large;"> </span></span></b></p><p class="MsoNormal"><b><span style="line-height: 107%;"><span style="font-size: large;">2. while<o:p></o:p></span></span></b></p><p class="MsoNormal"><b><span style="line-height: 107%;"><span style="font-size: large;">Syntax:<o:p></o:p></span></span></b></p><p class="MsoNormal"><span style="line-height: 107%;"><span style="font-size: large;">initialization<o:p></o:p></span></span></p><p class="MsoNormal"><span style="line-height: 107%;"><span style="font-size: large;">while(condition)<o:p></o:p></span></span></p><p class="MsoNormal"><span style="line-height: 107%;"><span style="font-size: large;">{<o:p></o:p></span></span></p><p class="MsoNormal"><span style="line-height: 107%;"><span style="font-size: large;">/*statements*/<o:p></o:p></span></span></p><p class="MsoNormal"><span style="line-height: 107%;"><span style="font-size: large;">increment/decrement<o:p></o:p></span></span></p><p class="MsoNormal"><span style="line-height: 107%;"><span style="font-size: large;">} <o:p></o:p></span></span></p><p class="MsoNormal"><b><span style="line-height: 107%;"><span style="font-size: large;"> </span></span></b></p><p class="MsoNormal"><b><span style="line-height: 107%;"><span style="font-size: large;"> </span></span></b></p><p class="MsoNormal"><b><span style="line-height: 107%;"><span style="font-size: large;"> </span></span></b></p><p class="MsoNormal"><b><span style="line-height: 107%;"><span style="font-size: large;"> </span></span></b></p><p class="MsoNormal"><b><span style="line-height: 107%;"><span style="font-size: large;"> </span></span></b></p><p class="MsoNormal"><b><span style="line-height: 107%;"><span style="font-size: large;">3. do
while<o:p></o:p></span></span></b></p><p class="MsoNormal"><b><span style="line-height: 107%;"><span style="font-size: large;">Syntax:<o:p></o:p></span></span></b></p><p class="MsoNormal"><span style="line-height: 107%;"><span style="font-size: large;">Initialization<o:p></o:p></span></span></p><p class="MsoNormal"><span style="line-height: 107%;"><span style="font-size: large;">do<o:p></o:p></span></span></p><p class="MsoNormal"><span style="line-height: 107%;"><span style="font-size: large;">{<o:p></o:p></span></span></p><p class="MsoNormal"><span style="line-height: 107%;"><span style="font-size: large;">/*statements*/<o:p></o:p></span></span></p><p class="MsoNormal"><span style="line-height: 107%;"><span style="font-size: large;">increment/decrement<o:p></o:p></span></span></p><p class="MsoNormal"><span style="line-height: 107%;"><span style="font-size: large;">}<o:p></o:p></span></span></p><p class="MsoListParagraphCxSpLast" style="mso-list: l1 level1 lfo4; text-indent: -18pt;">
</p><p class="MsoNormal"><span style="line-height: 107%;"><span style="font-size: large;">while(condition);<o:p></o:p></span></span></p><p class="MsoListParagraphCxSpLast" style="mso-list: l1 level1 lfo4; text-indent: -18pt;"><b><span style="line-height: 107%;"><span style="font-size: large;"><br /></span></span></b></p><p class="MsoListParagraphCxSpLast" style="mso-list: l1 level1 lfo4; text-indent: -18pt;"><b><span style="line-height: 107%;"><span style="font-size: large;"><br /></span></span></b></p><p class="MsoListParagraphCxSpLast" style="mso-list: l1 level1 lfo4; text-indent: -18pt;"><b><span style="line-height: 107%;"><span style="font-size: large;"><br /></span></span></b></p><p class="MsoListParagraphCxSpLast" style="mso-list: l1 level1 lfo4; text-indent: -18pt;"><b><span style="line-height: 107%;"><span style="font-size: large;"><br /></span></span></b></p><span style="font-size: large;"></span><p></p>Parag Jambhulkarhttp://www.blogger.com/profile/13991750622483538113noreply@blogger.com0tag:blogger.com,1999:blog-913600556879440043.post-14680361633146319092022-12-28T22:26:00.012+05:302022-12-28T22:29:17.903+05:30Apex Primitive Data Types | Salesforce Development | Integer, Long, Double, Decimal, Blob, id etc.<p><span style="font-size: large;"> <span> In this post, we will see Apex Primitive Data Types | Salesforce Development | Integer, Long, Double, Decimal, Blob, id etc. </span></span></p><p><span style="font-size: large;"></span></p><a name='more'></a><span style="font-size: large;"><br /></span><p></p><p></p><p align="center" class="MsoNormal" style="text-align: center;"><span style="font-size: large;"><b><u><span style="line-height: 107%;">Primitive Data Types in Apex</span></u></b><b><u><span style="line-height: 107%;"><o:p></o:p></span></u></b></span></p>
<p class="MsoNormal"><span style="font-size: large;"><b><u><span style="line-height: 107%;">Primitive
Data Types</span></u></b><b><span style="line-height: 107%;">:<o:p></o:p></span></b></span></p>
<p class="MsoNormal"><b><span style="font-size: large; line-height: 107%;"><span style="mso-tab-count: 1;"> </span>Basic Data Types which can not be defined
in terms of other data types.<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-size: large; line-height: 107%;"><o:p> </o:p></span></b></p>
<p class="MsoNormal"><span style="font-size: large;"><b><u><span style="line-height: 107%;">Derived/Structured
Data Types</span></u></b><b><span style="line-height: 107%;">:<o:p></o:p></span></b></span></p>
<p class="MsoNormal"><b><span style="font-size: large; line-height: 107%;"><span style="mso-tab-count: 1;"> </span>Data Types which can be defined in terms
of other data types.<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-size: large; line-height: 107%;">e.g.
class<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-size: large; line-height: 107%;"><o:p> </o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-size: large; line-height: 107%;">Syntax:<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-size: large; line-height: 107%;">Data_Type
Variable = Literal;<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-size: large; line-height: 107%;">e.g. Integer
x = 3;<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-size: large; line-height: 107%;"><o:p> </o:p></span></b></p>
<table align="left" border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; margin-left: 6.75pt; margin-right: 6.75pt; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-table-anchor-horizontal: margin; mso-table-anchor-vertical: paragraph; mso-table-left: left; mso-table-lspace: 9.0pt; mso-table-rspace: 9.0pt; mso-table-top: .25pt; mso-yfti-tbllook: 1184;">
<tbody><tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0;">
<td style="background: rgb(68, 114, 196); border: 1pt solid windowtext; mso-background-themecolor: accent1; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 63.55pt;" valign="top" width="85">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0cm; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;"><b><span style="color: white; font-size: large; mso-themecolor: background1;">S.N.<o:p></o:p></span></b></p>
</td>
<td style="background: rgb(68, 114, 196); border-left: none; border: 1pt solid windowtext; mso-background-themecolor: accent1; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 99.25pt;" valign="top" width="132">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0cm; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;"><b><span style="color: white; font-size: large; mso-themecolor: background1;">Data Type<o:p></o:p></span></b></p>
</td>
<td style="background: rgb(68, 114, 196); border-left: none; border: 1pt solid windowtext; mso-background-themecolor: accent1; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 288pt;" valign="top" width="384">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0cm; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;"><b><span style="color: white; font-size: large; mso-themecolor: background1;">Description<o:p></o:p></span></b></p>
</td>
</tr>
<tr style="mso-yfti-irow: 1;">
<td style="border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 63.55pt;" valign="top" width="85">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0cm; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;"><b><span style="font-size: large;">1.<o:p></o:p></span></b></p>
</td>
<td style="border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 99.25pt;" valign="top" width="132">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0cm; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;"><b><span style="font-size: large;">integer<o:p></o:p></span></b></p>
</td>
<td style="border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 288pt;" valign="top" width="384">
<p class="MsoListParagraphCxSpFirst" style="line-height: normal; margin-bottom: 0cm; mso-add-space: auto; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly; mso-list: l0 level1 lfo1; text-indent: -18pt;"><span style="font-size: large;"><!--[if !supportLists]--><span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-bidi-font-weight: bold; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font-family: "Times New Roman"; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></span></span><!--[endif]--><b><span>Used to save
integer values<o:p></o:p></span></b></span></p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: 0cm; mso-add-space: auto; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly; mso-list: l0 level1 lfo1; text-indent: -18pt;"><span style="font-size: large;"><!--[if !supportLists]--><span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-bidi-font-weight: bold; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font-family: "Times New Roman"; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></span></span><!--[endif]--><b><span>Variable
occupies 32 bit memory<o:p></o:p></span></b></span></p>
<p class="MsoListParagraphCxSpLast" style="line-height: normal; margin-bottom: 0cm; mso-add-space: auto; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly; mso-list: l0 level1 lfo1; text-indent: -18pt;"><span style="font-size: large;"><!--[if !supportLists]--><span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-bidi-font-weight: bold; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font-family: "Times New Roman"; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></span></span><!--[endif]--><b><span>Range -2<sup>31</sup>
to 2<sup>31</sup>-1<o:p></o:p></span></b></span></p>
</td>
</tr>
<tr style="mso-yfti-irow: 2;">
<td style="border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 63.55pt;" valign="top" width="85">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0cm; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;"><b><span style="font-size: large;">2.<o:p></o:p></span></b></p>
</td>
<td style="border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 99.25pt;" valign="top" width="132">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0cm; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;"><b><span style="font-size: large;">long<o:p></o:p></span></b></p>
</td>
<td style="border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 288pt;" valign="top" width="384">
<p class="MsoListParagraphCxSpFirst" style="line-height: normal; margin-bottom: 0cm; mso-add-space: auto; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly; mso-list: l2 level1 lfo2; text-indent: -18pt;"><span style="font-size: large;"><!--[if !supportLists]--><span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-bidi-font-weight: bold; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font-family: "Times New Roman"; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></span></span><!--[endif]--><b><span>Used to save
integer values<o:p></o:p></span></b></span></p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: 0cm; mso-add-space: auto; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly; mso-list: l2 level1 lfo2; text-indent: -18pt;"><span style="font-size: large;"><!--[if !supportLists]--><span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-bidi-font-weight: bold; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font-family: "Times New Roman"; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></span></span><!--[endif]--><b><span>Variable
occupies 64 bit memory<o:p></o:p></span></b></span></p>
<p class="MsoListParagraphCxSpLast" style="line-height: normal; margin-bottom: 0cm; mso-add-space: auto; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly; mso-list: l2 level1 lfo2; text-indent: -18pt;"><span style="font-size: large;"><!--[if !supportLists]--><span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-bidi-font-weight: bold; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font-family: "Times New Roman"; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></span></span><!--[endif]--><b><span>Range -2<sup>63</sup>
to 2<sup>63</sup>-1<o:p></o:p></span></b></span></p>
</td>
</tr>
<tr style="mso-yfti-irow: 3;">
<td style="border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 63.55pt;" valign="top" width="85">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0cm; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;"><b><span style="font-size: large;">3.<o:p></o:p></span></b></p>
</td>
<td style="border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 99.25pt;" valign="top" width="132">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0cm; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;"><b><span style="font-size: large;">double<o:p></o:p></span></b></p>
</td>
<td style="border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 288pt;" valign="top" width="384">
<p class="MsoListParagraphCxSpFirst" style="line-height: 107%; margin-bottom: 8pt; mso-add-space: auto; mso-list: l6 level1 lfo3; text-indent: -18pt;"><span style="font-size: large;"><!--[if !supportLists]--><span style="font-family: Symbol; line-height: 107%; mso-bidi-font-family: Symbol; mso-bidi-font-weight: bold; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font-family: "Times New Roman"; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></span></span><!--[endif]--><b><span style="line-height: 107%;">Used to save decimal point values e.g. 3.2<o:p></o:p></span></b></span></p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: 0cm; mso-add-space: auto; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly; mso-list: l6 level1 lfo3; text-indent: -18pt;"><span style="font-size: large;"><!--[if !supportLists]--><span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-bidi-font-weight: bold; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font-family: "Times New Roman"; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></span></span><!--[endif]--><b><span>Variable
occupies 64 bit memory<o:p></o:p></span></b></span></p>
<p class="MsoListParagraphCxSpLast" style="line-height: normal; margin-bottom: 0cm; mso-add-space: auto; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly; mso-list: l6 level1 lfo3; text-indent: -18pt;"><span style="font-size: large;"><!--[if !supportLists]--><span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-bidi-font-weight: bold; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font-family: "Times New Roman"; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></span></span><!--[endif]--><b><span>Range -2<sup>63</sup>
to 2<sup>63</sup>-1<o:p></o:p></span></b></span></p>
</td>
</tr>
<tr style="mso-yfti-irow: 4;">
<td style="border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 63.55pt;" valign="top" width="85">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0cm; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;"><b><span style="font-size: large;">4.<o:p></o:p></span></b></p>
</td>
<td style="border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 99.25pt;" valign="top" width="132">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0cm; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;"><b><span style="font-size: large;">decimal<o:p></o:p></span></b></p>
</td>
<td style="border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 288pt;" valign="top" width="384">
<p class="MsoListParagraphCxSpFirst" style="line-height: 107%; margin-bottom: 8pt; mso-add-space: auto; mso-list: l3 level1 lfo4; text-indent: -18pt;"><span style="font-size: large;"><!--[if !supportLists]--><span style="font-family: Symbol; line-height: 107%; mso-bidi-font-family: Symbol; mso-bidi-font-weight: bold; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font-family: "Times New Roman"; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></span></span><!--[endif]--><b><span style="line-height: 107%;">Used to save decimal point values e.g. 3.2<o:p></o:p></span></b></span></p>
<p class="MsoListParagraphCxSpLast" style="line-height: normal; margin-bottom: 0cm; mso-add-space: auto; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly; mso-list: l3 level1 lfo4; text-indent: -18pt;"><span style="font-size: large;"><!--[if !supportLists]--><span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-bidi-font-weight: bold; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font-family: "Times New Roman"; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></span></span><!--[endif]--><b><span>Decimals
have no bounds and can grow to any size<o:p></o:p></span></b></span></p>
</td>
</tr>
<tr style="mso-yfti-irow: 5;">
<td style="border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 63.55pt;" valign="top" width="85">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0cm; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;"><b><span style="font-size: large;">5.<o:p></o:p></span></b></p>
</td>
<td style="border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 99.25pt;" valign="top" width="132">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0cm; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;"><b><span style="font-size: large;">string<o:p></o:p></span></b></p>
</td>
<td style="border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 288pt;" valign="top" width="384">
<p class="MsoListParagraphCxSpFirst" style="line-height: normal; margin-bottom: 0cm; mso-add-space: auto; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly; mso-list: l4 level1 lfo5; text-indent: -18pt;"><span style="font-size: large;"><!--[if !supportLists]--><span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-bidi-font-weight: bold; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font-family: "Times New Roman"; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></span></span><!--[endif]--><b><span>Used to save
string value e.g. ‘Hello World’<o:p></o:p></span></b></span></p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: 0cm; mso-add-space: auto; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly; mso-list: l4 level1 lfo5; text-indent: -18pt;"><span style="font-size: large;"><!--[if !supportLists]--><span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-bidi-font-weight: bold; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font-family: "Times New Roman"; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></span></span><!--[endif]--><b><span>Value should
be enclosed in single quote <o:p></o:p></span></b></span></p>
<p class="MsoListParagraphCxSpLast" style="line-height: normal; margin-bottom: 0cm; mso-add-space: auto; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;"><b><span style="font-size: large;">e.g. ‘Parag Jambhulkar’<o:p></o:p></span></b></p>
</td>
</tr>
<tr style="mso-yfti-irow: 6;">
<td style="border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 63.55pt;" valign="top" width="85">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0cm; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;"><b><span style="font-size: large;">6.<o:p></o:p></span></b></p>
</td>
<td style="border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 99.25pt;" valign="top" width="132">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0cm; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;"><b><span style="font-size: large;">boolean<o:p></o:p></span></b></p>
</td>
<td style="border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 288pt;" valign="top" width="384">
<p class="MsoListParagraph" style="line-height: normal; margin-bottom: 0cm; mso-add-space: auto; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly; mso-list: l5 level1 lfo6; text-indent: -18pt;"><span style="font-size: large;"><!--[if !supportLists]--><span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-bidi-font-weight: bold; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font-family: "Times New Roman"; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span></span><!--[endif]--><b><span>Used to save boolean values i.e. true or false<o:p></o:p></span></b></span></p>
</td>
</tr>
<tr style="mso-yfti-irow: 7;">
<td style="border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 63.55pt;" valign="top" width="85">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0cm; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;"><b><span style="font-size: large;">7.<o:p></o:p></span></b></p>
</td>
<td style="border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 99.25pt;" valign="top" width="132">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0cm; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;"><b><span style="font-size: large;">date<o:p></o:p></span></b></p>
</td>
<td style="border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 288pt;" valign="top" width="384">
<p class="MsoListParagraph" style="line-height: normal; margin-bottom: 0cm; mso-add-space: auto; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly; mso-list: l5 level1 lfo6; text-indent: -18pt;"><span style="font-size: large;"><!--[if !supportLists]--><span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-bidi-font-weight: bold; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font-family: "Times New Roman"; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span></span><!--[endif]--><b><span>Used to save date<o:p></o:p></span></b></span></p>
</td>
</tr>
<tr style="mso-yfti-irow: 8;">
<td style="border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 63.55pt;" valign="top" width="85">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0cm; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;"><b><span style="font-size: large;">8.<o:p></o:p></span></b></p>
</td>
<td style="border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 99.25pt;" valign="top" width="132">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0cm; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;"><b><span style="font-size: large;">time<o:p></o:p></span></b></p>
</td>
<td style="border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 288pt;" valign="top" width="384">
<p class="MsoListParagraph" style="line-height: normal; margin-bottom: 0cm; mso-add-space: auto; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly; mso-list: l5 level1 lfo6; text-indent: -18pt;"><span style="font-size: large;"><!--[if !supportLists]--><span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-bidi-font-weight: bold; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font-family: "Times New Roman"; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span></span><!--[endif]--><b><span>Used to save time<o:p></o:p></span></b></span></p>
</td>
</tr>
<tr style="mso-yfti-irow: 9;">
<td style="border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 63.55pt;" valign="top" width="85">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0cm; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;"><b><span style="font-size: large;">9.<o:p></o:p></span></b></p>
</td>
<td style="border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 99.25pt;" valign="top" width="132">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0cm; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;"><b><span style="font-size: large;">datetime<o:p></o:p></span></b></p>
</td>
<td style="border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 288pt;" valign="top" width="384">
<p class="MsoListParagraph" style="line-height: normal; margin-bottom: 0cm; mso-add-space: auto; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly; mso-list: l5 level1 lfo6; text-indent: -18pt;"><span style="font-size: large;"><!--[if !supportLists]--><span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-bidi-font-weight: bold; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font-family: "Times New Roman"; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span></span><!--[endif]--><b><span>Used to save date and time<o:p></o:p></span></b></span></p>
</td>
</tr>
<tr style="mso-yfti-irow: 10;">
<td style="border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 63.55pt;" valign="top" width="85">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0cm; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;"><b><span style="font-size: large;">10.<o:p></o:p></span></b></p>
</td>
<td style="border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 99.25pt;" valign="top" width="132">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0cm; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;"><b><span style="font-size: large;">blob<o:p></o:p></span></b></p>
</td>
<td style="border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 288pt;" valign="top" width="384">
<p class="MsoListParagraphCxSpFirst" style="line-height: normal; margin-bottom: 0cm; mso-add-space: auto; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly; mso-list: l5 level1 lfo6; text-indent: -18pt;"><span style="font-size: large;"><!--[if !supportLists]--><span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-bidi-font-weight: bold; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font-family: "Times New Roman"; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></span></span><!--[endif]--><b><span>Saves binary
data<o:p></o:p></span></b></span></p>
<p class="MsoListParagraphCxSpLast" style="line-height: normal; margin-bottom: 0cm; mso-add-space: auto; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly; mso-list: l5 level1 lfo6; text-indent: -18pt;"><span style="font-size: large;"><!--[if !supportLists]--><span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-bidi-font-weight: bold; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font-family: "Times New Roman"; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></span></span><!--[endif]--><b><span>Used to save
any image, audio or multimedia file<o:p></o:p></span></b></span></p>
</td>
</tr>
<tr style="mso-yfti-irow: 11; mso-yfti-lastrow: yes;">
<td style="border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 63.55pt;" valign="top" width="85">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0cm; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;"><b><span style="font-size: large;">11.<o:p></o:p></span></b></p>
</td>
<td style="border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 99.25pt;" valign="top" width="132">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0cm; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;"><b><span style="font-size: large;">id<o:p></o:p></span></b></p>
</td>
<td style="border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 288pt;" valign="top" width="384">
<p class="MsoListParagraphCxSpFirst" style="line-height: normal; margin-bottom: 0cm; mso-add-space: auto; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly; mso-list: l1 level1 lfo7; text-indent: -18pt;"><span style="font-size: large;"><!--[if !supportLists]--><span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-bidi-font-weight: bold; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font-family: "Times New Roman"; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></span></span><!--[endif]--><b><span>Used to save
Salesforce record id, object id or any kind of metadata id<o:p></o:p></span></b></span></p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: 0cm; mso-add-space: auto; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly; mso-list: l1 level1 lfo7; text-indent: -18pt;"><span style="font-size: large;"><!--[if !supportLists]--><span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-bidi-font-weight: bold; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font-family: "Times New Roman"; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></span></span><!--[endif]--><b><span>It can be of
15 digits or 18 digits<o:p></o:p></span></b></span></p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: 0cm; mso-add-space: auto; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly; mso-list: l1 level1 lfo7; text-indent: -18pt;"><span style="font-size: large;"><!--[if !supportLists]--><span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-bidi-font-weight: bold; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font-family: "Times New Roman"; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></span></span><!--[endif]--><b><span>15 digit is
case sensitive id<o:p></o:p></span></b></span></p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: 0cm; mso-add-space: auto; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly; mso-list: l1 level1 lfo7; text-indent: -18pt;"><span style="font-size: large;"><!--[if !supportLists]--><span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-bidi-font-weight: bold; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font-family: "Times New Roman"; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></span></span><!--[endif]--><b><span>18 digit is
case insensitive id<o:p></o:p></span></b></span></p>
<p class="MsoListParagraphCxSpLast" style="line-height: normal; margin-bottom: 0cm; mso-add-space: auto; mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-top: .25pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly; mso-list: l1 level1 lfo7; text-indent: -18pt;"><span style="font-size: large;"><!--[if !supportLists]--><span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-bidi-font-weight: bold; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font-family: "Times New Roman"; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></span></span><!--[endif]--><b><span>If you
allocate 15 digit id then it get automatically converted to 18 digit id<o:p></o:p></span></b></span></p>
</td>
</tr>
</tbody></table>
<p class="MsoNormal"><b><span style="font-size: large; line-height: 107%;"><o:p> </o:p></span></b></p>
<p class="MsoNormal"><span style="font-size: large;"><b><u><span style="line-height: 107%;"><br /></span></u></b></span></p><p class="MsoNormal"><span style="font-size: large;"><b><u><span style="line-height: 107%;"><br /></span></u></b></span></p><p class="MsoNormal"><span style="font-size: large;"><b><u><span style="line-height: 107%;"><br /></span></u></b></span></p><p class="MsoNormal"><span style="font-size: large;"><b><u><span style="line-height: 107%;"><br /></span></u></b></span></p><p class="MsoNormal"><span style="font-size: large;"><b><u><span style="line-height: 107%;"><br /></span></u></b></span></p><p class="MsoNormal"><span style="font-size: large;"><b><u><span style="line-height: 107%;"><br /></span></u></b></span></p><p class="MsoNormal"><span style="font-size: large;"><b><u><span style="line-height: 107%;"><br /></span></u></b></span></p><p class="MsoNormal"><span style="font-size: large;"><b><u><span style="line-height: 107%;"><br /></span></u></b></span></p><p class="MsoNormal"><span style="font-size: large;"><b><u><span style="line-height: 107%;"><br /></span></u></b></span></p><p class="MsoNormal"><span style="font-size: large;"><b><u><span style="line-height: 107%;"><br /></span></u></b></span></p><p class="MsoNormal"><span style="font-size: large;"><b><u><span style="line-height: 107%;"><br /></span></u></b></span></p><p class="MsoNormal"><span style="font-size: large;"><b><u><span style="line-height: 107%;"><br /></span></u></b></span></p><p class="MsoNormal"><span style="font-size: large;"><b><u><span style="line-height: 107%;"><br /></span></u></b></span></p><p class="MsoNormal"><span style="font-size: large;"><b><u><span style="line-height: 107%;"><br /></span></u></b></span></p><p class="MsoNormal"><span style="font-size: large;"><b><u><span style="line-height: 107%;"><br /></span></u></b></span></p><p class="MsoNormal"><span style="font-size: large;"><b><u><span style="line-height: 107%;"><br /></span></u></b></span></p><p class="MsoNormal"><span style="font-size: large;"><b><u><span style="line-height: 107%;"><br /></span></u></b></span></p><p class="MsoNormal"><span style="font-size: large;"><b><u><span style="line-height: 107%;"><br /></span></u></b></span></p><p class="MsoNormal"><span style="font-size: large;"><b><u><span style="line-height: 107%;"><br /></span></u></b></span></p><p class="MsoNormal"><span style="font-size: large;"><b><u><span style="line-height: 107%;"><br /></span></u></b></span></p><p class="MsoNormal"><span style="font-size: large;"><b><u><span style="line-height: 107%;"><br /></span></u></b></span></p><p class="MsoNormal"><span style="font-size: large;"><b><u><span style="line-height: 107%;"><br /></span></u></b></span></p><p class="MsoNormal"><span style="font-size: large;"><b><u><span style="line-height: 107%;"><br /></span></u></b></span></p><p class="MsoNormal"><span style="font-size: large;"><b><u><span style="line-height: 107%;"><br /></span></u></b></span></p><p class="MsoNormal"><span style="font-size: large;"><b><u><span style="line-height: 107%;"><br /></span></u></b></span></p><p class="MsoNormal"><span style="font-size: large;"><b><u><span style="line-height: 107%;"><br /></span></u></b></span></p><p class="MsoNormal"><span style="font-size: large;"><b><u><span style="line-height: 107%;"><br /></span></u></b></span></p><p class="MsoNormal"><b style="font-size: x-large;"><u><span style="line-height: 107%;">Note</span></u></b><b style="font-size: x-large;"><span style="line-height: 107%;">: If you are not assigning any value
to variable, then by default its value is set to null.</span></b></p>
<p class="MsoNormal"><b><span style="font-size: large; line-height: 107%;"><o:p> </o:p></span></b></p><p class="MsoNormal"><span style="font-size: large; line-height: 107%;"><o:p><b>Program Code (Class DataTypes):</b></o:p></span></p><p class="MsoNormal"><span style="font-size: large;">public class DataTypes {</span></p><p></p><p class="MsoNormal"><span style="font-size: large;"> public integer a=3;</span></p><p class="MsoNormal"><span style="font-size: large;"> public Long b=5L;</span></p><p class="MsoNormal"><span style="font-size: large;"> public double c=3.2;</span></p><p class="MsoNormal"><span style="font-size: large;"> public decimal d=5.7;</span></p><p class="MsoNormal"><span style="font-size: large;"> public string e='Parag Jambhulkar';</span></p><p class="MsoNormal"><span style="font-size: large;"> public boolean f=true;</span></p><p class="MsoNormal"><span style="font-size: large;"> //public date dd=Date.newInstance(year, month, day)</span></p><p class="MsoNormal"><span style="font-size: large;"> public date g=Date.newInstance(2022, 12, 26);</span></p><p class="MsoNormal"><span style="font-size: large;"> //public time hh=Time.newInstance(hour, minute, second, millisecond)</span></p><p class="MsoNormal"><span style="font-size: large;"> public time h=Time.newInstance(06, 30, 32, 5);</span></p><p class="MsoNormal"><span style="font-size: large;"> //public datetime ii= Datetime.newInstance(date, time)</span></p><p class="MsoNormal"><span style="font-size: large;"> public datetime i=DateTime.newInstanceGmt(g, h);</span></p><p class="MsoNormal"><span style="font-size: large;"> public blob j=blob.valueOf('paragjam');</span></p><p class="MsoNormal"><span style="font-size: large;"> public id k='0D5B000001DVM9t';</span></p><p class="MsoNormal"><span style="font-size: large;"> </span></p><p class="MsoNormal"><span style="font-size: large;"> public void show()</span></p><p class="MsoNormal"><span style="font-size: large;"> {</span></p><p class="MsoNormal"><span style="font-size: large;"> system.debug('integer value:'+a); </span></p><p class="MsoNormal"><span style="font-size: large;"> system.debug('long value:'+b);</span></p><p class="MsoNormal"><span style="font-size: large;"> system.debug('double value:'+c); </span></p><p class="MsoNormal"><span style="font-size: large;"> system.debug('decimal value:'+d); </span></p><p class="MsoNormal"><span style="font-size: large;"> system.debug('string value:'+e);</span></p><p class="MsoNormal"><span style="font-size: large;"> system.debug('boolean value:'+f); </span></p><p class="MsoNormal"><span style="font-size: large;"> system.debug('date value:'+g); </span></p><p class="MsoNormal"><span style="font-size: large;"> system.debug('time value:'+h); </span></p><p class="MsoNormal"><span style="font-size: large;"> system.debug('datetime value:'+i); </span></p><p class="MsoNormal"><span style="font-size: large;"> system.debug('blob value:'+j); </span></p><p class="MsoNormal"><span style="font-size: large;"> system.debug('id value:'+k);</span></p><p class="MsoNormal"><span style="font-size: large;"> }</span></p><p class="MsoNormal"><span style="font-size: large; line-height: 107%;"></span></p><p class="MsoNormal"><span style="font-size: large;">}</span></p><p class="MsoNormal"><span style="font-size: large;"><br /></span></p><p class="MsoNormal"><span style="font-size: large;"><b>Program Code: (Anonymous Window)</b></span></p><p class="MsoNormal"><span style="font-size: large;">DataTypes obj=new DataTypes();</span></p><p class="MsoNormal"><span style="font-size: large;">obj.show(); </span></p><p class="MsoNormal"><span style="font-size: large;"><br /></span></p><p></p><p class="MsoNormal"><span style="font-size: large; line-height: 107%;"><o:p> </o:p></span></p><span style="font-size: large;"></span><p></p>Parag Jambhulkarhttp://www.blogger.com/profile/13991750622483538113noreply@blogger.com0tag:blogger.com,1999:blog-913600556879440043.post-43826012484085319492022-12-25T22:09:00.002+05:302022-12-25T22:09:17.962+05:30Apex Access Modifiers | Access Modifiers in Apex Class Salesforce | Private Protected Public Global<p><span style="font-size: large;"> In this post, we will see Apex Access Modifiers | Access Modifiers in Apex Class Salesforce | Private Protected Public Global </span></p><p><span></span></p><a name='more'></a><span style="font-size: large;"><br /></span><p></p><p><span style="font-size: large;"><b>Access Modifiers in Apex</b></span></p><p><span style="font-size: large;">1. Private</span></p><p><span style="font-size: large;">2. Protected</span></p><p><span style="font-size: large;">3. Public</span></p><p><span style="font-size: large;">4. Global</span></p><p><span style="font-size: large;"><b><br /></b></span></p><p><span style="font-size: large;"><b>Accessibility Level</b></span></p><p><span style="font-size: large;">Private < Protected < Public < Global</span></p><p><span style="font-size: large;"><b><br /></b></span></p><p><span style="font-size: large;"><b>Org1 AppExchange Org2</b></span></p><p><span style="font-size: large;"></span></p><p><br /></p><p><span style="font-size: large;"><b>Program Code: (Class A)</b></span></p><p><span style="font-size: large;">abstract public class A {</span></p><p><span style="font-size: large;"> protected integer A_val=3;</span></p><p><span style="font-size: large;"> </span></p><p><span style="font-size: large;"> public void A_show()</span></p><p><span style="font-size: large;"> {</span></p><p><span style="font-size: large;"> system.debug('Value of A_val:'+A_val);</span></p><p><span style="font-size: large;"> }</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;">}</span></p><p><span style="font-size: large;"><b>Program Code: (Class B)</b></span></p><p><span style="font-size: large;">public class B extends A</span></p><p><span style="font-size: large;">{</span></p><p><span style="font-size: large;"> public void B_show()</span></p><p><span style="font-size: large;"> {</span></p><p><span style="font-size: large;"> system.debug('Value of A_val:'+A_val);</span></p><p><span style="font-size: large;"> }</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;">}</span></p>Parag Jambhulkarhttp://www.blogger.com/profile/13991750622483538113noreply@blogger.com0tag:blogger.com,1999:blog-913600556879440043.post-32501686905563190432022-12-21T22:46:00.004+05:302023-03-31T09:41:22.073+05:30How To Write Apex Class in Salesforce | Apex Class for Beginners<p> <span style="font-size: large;"> In this post, we will see How To Write Apex Class in Salesforce | Apex Class for Beginners.</span></p><p><span></span></p><a name='more'></a><span style="font-size: large;"><br /></span><p></p><p><span style="font-size: large;"><b>Program Code: (class Calc)</b></span></p><p><span style="font-size: large;">public class Calc {</span></p><p><span style="font-size: large;"> </span></p><p><span style="font-size: large;"> public double result;</span></p><p><span style="font-size: large;"> </span></p><p><span style="font-size: large;"> public double add(integer x, integer y)</span></p><p><span style="font-size: large;"> {</span></p><p><span style="font-size: large;"> result=x+y;</span></p><p><span style="font-size: large;"> return result; </span></p><p><span style="font-size: large;"> }</span></p><p><span style="font-size: large;"> </span></p><p><span style="font-size: large;"> public double sub(integer x, integer y)</span></p><p><span style="font-size: large;"> {</span></p><p><span style="font-size: large;"> result=x-y;</span></p><p><span style="font-size: large;"> return result; </span></p><p><span style="font-size: large;"> }</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;">}</span></p><p><span style="font-size: x-large;"><b>Program Code: (code in Anonymous Window)</b></span></p><p><span style="font-size: large;">Calc c=new Calc();</span></p><p><span style="font-size: large;">double res;</span></p><p><span style="font-size: large;">res=c.add(3,5);</span></p><p><span style="font-size: large;">system.debug('Addition='+res);</span></p><p><span style="font-size: large;">res=c.sub(3,5);</span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;">system.debug('Difference='+res);</span></p>Parag Jambhulkarhttp://www.blogger.com/profile/13991750622483538113noreply@blogger.com0tag:blogger.com,1999:blog-913600556879440043.post-14781646213224225932022-11-22T19:36:00.002+05:302022-11-22T19:36:41.534+05:30Sample Page<p> </p>
<a href="http://www.naac.gov.in/docs/Manuals/RAF_Affiliated%20_College_Manual.pdf#page=51" target="_blank"> Key Indicator- 1.2 Academic Flexibility (30) </a>Parag Jambhulkarhttp://www.blogger.com/profile/13991750622483538113noreply@blogger.com0tag:blogger.com,1999:blog-913600556879440043.post-70177235294041240422022-10-12T19:56:00.001+05:302022-10-12T19:56:01.085+05:30C++ Class, Object, Constructor, Destructor, Data Members and Member Functions | All in One Video<p> <span style="font-size: large;"> In this post, we will see C++ Class, Object, Constructor, Destructor, Data Members and Member Functions | All in One Video </span></p><p><span></span></p><a name='more'></a><span style="font-size: large;"><br /></span><p></p><p><span style="font-size: large;"><b>Program Code: (classexample.cpp)</b></span></p><p><span style="font-size: large;">#include<iostream></span></p><p><span style="font-size: large;">using namespace std;</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">class Sample</span></p><p><span style="font-size: large;">{</span></p><p><span style="font-size: large;"> private:</span></p><p><span style="font-size: large;"> int a,b;</span></p><p><span style="font-size: large;"> </span></p><p><span style="font-size: large;"> public:</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"> Sample() //default constructor</span></p><p><span style="font-size: large;"> {</span></p><p><span style="font-size: large;"> a=4;</span></p><p><span style="font-size: large;"> b=9;</span></p><p><span style="font-size: large;"> cout<<"Inside default constructor"<<endl;</span></p><p><span style="font-size: large;"> }</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"> Sample(int x,int y) //parameterized constructor</span></p><p><span style="font-size: large;"> {</span></p><p><span style="font-size: large;"> a=x;</span></p><p><span style="font-size: large;"> b=y;</span></p><p><span style="font-size: large;"> cout<<"Inside parameterized constructor"<<endl;</span></p><p><span style="font-size: large;"> }</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"> ~Sample() //destructor</span></p><p><span style="font-size: large;"> {</span></p><p><span style="font-size: large;"> cout<<"Inside destructor"<<endl;</span></p><p><span style="font-size: large;"> }</span></p><p><span style="font-size: large;"> </span></p><p><span style="font-size: large;"> void getdata()</span></p><p><span style="font-size: large;"> {</span></p><p><span style="font-size: large;"> cout<<"Enter first number"<<endl;</span></p><p><span style="font-size: large;"> cin>>a;</span></p><p><span style="font-size: large;"> cout<<"Enter second number"<<endl;</span></p><p><span style="font-size: large;"> cin>>b;</span></p><p><span style="font-size: large;"> }</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"> void showdata()</span></p><p><span style="font-size: large;"> {</span></p><p><span style="font-size: large;"> cout<<"Value of a="<<a<<endl;</span></p><p><span style="font-size: large;"> cout<<"Value of b="<<b<<endl;</span></p><p><span style="font-size: large;"> }</span></p><p><span style="font-size: large;"> </span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">};</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">int main()</span></p><p><span style="font-size: large;">{</span></p><p><span style="font-size: large;">Sample s1;</span></p><p><span style="font-size: large;">Sample s2(5,6);</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">s1.getdata();</span></p><p><span style="font-size: large;">s1.showdata();</span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;">} </span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"><b>Watch following video:</b></span></p><p><span style="font-size: large;"><b><br />
<iframe width="640" height="360" src="https://www.youtube.com/embed/J8Md8rO0y7g" title="" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</b></span></p><p><span style="font-size: large;"><b>Watch on YouTube: <a href="https://www.youtube.com/watch?v=J8Md8rO0y7g" target="_blank">https://www.youtube.com/watch?v=J8Md8rO0y7g</a></b></span></p>Parag Jambhulkarhttp://www.blogger.com/profile/13991750622483538113noreply@blogger.com0tag:blogger.com,1999:blog-913600556879440043.post-84683113374897969822022-10-10T20:00:00.018+05:302022-10-14T15:02:22.366+05:30Data Types in C++<p><span style="font-family: inherit; font-size: large;"> <span> In this post, we will see Data Types in C++.</span></span></p><p><span style="font-family: inherit; font-size: large;"><br /></span></p><p><span style="font-family: inherit; font-size: large;"></span></p><a name='more'></a><span style="font-family: inherit; font-size: large;"><span></span><span> </span></span><p></p><p><span style="font-family: inherit; font-size: large;"><b>Data Type Definition:</b></span></p><p><span style="font-family: inherit; font-size: large;"><span> </span><span style="line-height: 107%;">Data type
is an attribute of variables which defines what values variable can have and
what operations can be performed on these variables.</span></span></p><p><span style="font-family: inherit; font-size: large; line-height: 107%;"><br /></span></p><p><span style="font-family: inherit; font-size: large; line-height: 107%;">e.g. </span></p><p><span style="font-family: inherit; font-size: large; line-height: 107%;">int variable can have value 3, 7,13 etc. while float can have value 31.4, 5.2 etc. </span></p><p><span style="font-family: inherit; font-size: large; line-height: 107%;"><br /></span></p><p><span style="font-family: inherit; font-size: large; line-height: 107%;">We can perform addition, subtraction on int, float variables while we can negate Boolean variable. </span></p><p><span style="font-family: inherit; font-size: large;"> </span></p><p><span style="font-family: inherit; font-size: large;"> <b>Classification of Data Types in C++ </b></span></p><p><span style="font-family: inherit; font-size: large;"></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvKILju-dap_gOR7zZG9GalwnIvgWmXfge4ciccG6qxKoZolYDXcd8Br3v77s2trDix2kKl_43kMXCO_ZwolcDvZFpJwVGDxbedFS1iMktSAazTcCi3gf9mpUb87Rxzssuqi2QJgPywIE4GOh2lrvPloFi4RU9aUYDr1QwqrZ9qsNuzqoebESfPo8Ctg/s705/c++%20data%20types.jpeg" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: inherit; font-size: large;"><img border="0" data-original-height="361" data-original-width="705" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvKILju-dap_gOR7zZG9GalwnIvgWmXfge4ciccG6qxKoZolYDXcd8Br3v77s2trDix2kKl_43kMXCO_ZwolcDvZFpJwVGDxbedFS1iMktSAazTcCi3gf9mpUb87Rxzssuqi2QJgPywIE4GOh2lrvPloFi4RU9aUYDr1QwqrZ9qsNuzqoebESfPo8Ctg/s16000/c++%20data%20types.jpeg" /></span></a></div><span style="font-family: inherit; font-size: large;"><br /></span><div class="separator" style="clear: both; text-align: center;"><span style="font-family: inherit; font-size: large;"><br /></span></div><span style="font-family: inherit; font-size: large;"><br /><b><br /></b></span><p></p><p><span style="font-family: inherit; font-size: large;"><b>The primitive data types are of three types:</b></span></p><p><span style="font-family: inherit; font-size: large;"><br /></span></p><p><span style="font-family: inherit; font-size: large;">1. <b>Integral</b> type, which means there is no decimal point</span></p><p><span style="font-family: inherit; font-size: large;">2. <b>Boolean</b> means true or false</span></p><p><span style="font-family: inherit; font-size: large;"></span></p><p><span style="font-family: inherit; font-size: large;">3. <b>Floating-point</b> with the decimal point </span></p><p><span style="font-family: inherit; font-size: large;"><br /></span></p><p><span style="font-family: inherit; font-size: large;"><b>C++ Type Modifiers:</b></span></p><p><span style="font-family: inherit; font-size: large;"> By using Type Modifiers, we can can modify the data type of variables.</span></p><p><span style="font-family: inherit; font-size: large;"><br /></span></p><p><span style="font-family: inherit; font-size: large;"> Following are the Type Modifiers in C++:</span></p><p><span style="font-family: inherit; font-size: large;">1. signed (can be applied to int, char)</span></p><p><span style="font-family: inherit; font-size: large;">2. unsigned (can be applied to int, char)</span></p><p><span style="font-family: inherit; font-size: large;">3. short (can be applied to int)</span></p><p><span style="font-family: inherit; font-size: large;">4. long (can be applied to int, double)</span></p><p><span style="font-family: inherit; font-size: large;"><br /></span></p><p><span style="font-family: inherit; font-size: large;"> C++ allows a shorthand notation for declaring <b>unsigned</b>, <b>short</b>, or <b>long</b> integers. That means, we can use them without int. </span></p><p><span style="font-family: inherit; font-size: large;"><br /></span></p><p><span style="font-family: inherit; font-size: large;">e.g. </span></p><p><span style="font-family: inherit; font-size: large;">unsigned x;</span></p><p><span style="font-family: inherit; font-size: large;">short x;</span></p><p><span style="font-family: inherit; font-size: large;">long x; </span></p><p><span style="font-family: inherit; font-size: large;"><br /></span></p><p><span style="font-family: inherit; font-size: large;"><b>Size of Data Types (in bytes):</b></span></p><p><span style="font-family: inherit; font-size: large;">Size of int: 4</span></p><p><span style="font-family: inherit; font-size: large;">Size of signed int: 4</span></p><p><span style="font-family: inherit; font-size: large;">Size of unsigned int: 4</span></p><p><span style="font-family: inherit; font-size: large;">Size of short int: 2</span></p><p><span style="font-family: inherit; font-size: large;">Size of long int: 4</span></p><p><span style="font-family: inherit; font-size: large;">Size of long long int: 8</span></p><p><span style="font-family: inherit; font-size: large;">Size of char: 1</span></p><p><span style="font-family: inherit; font-size: large;">Size of signed char: 1</span></p><p><span style="font-family: inherit; font-size: large;">Size of unsigned char: 1</span></p><p><span style="font-family: inherit; font-size: large;">Size of float: 4</span></p><p><span style="font-family: inherit; font-size: large;">Size of double: 8</span></p><p><span style="font-family: inherit; font-size: large;">Size of long double: 12</span></p><p><span style="font-family: inherit; font-size: large;"></span></p><p><span style="font-family: inherit; font-size: large;">Size of bool: 1</span></p><p><span style="font-family: inherit; font-size: large;"><br /></span></p><p><span style="font-family: inherit; font-size: large;"><b>Range of possible values:</b></span></p><p><span style="font-family: inherit; font-size: large;"></span></p><div class="separator" style="clear: both; text-align: center;"><span style="font-family: inherit; font-size: large;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixs9g6fcaFWJ48z-6RZuKJIizZTz1znaMDkToJwq5zET_Lqm2ErVgdRhSfsMhMQOLAsp3_Q4NHDMz5U_bZLhCVsSwY25Ldm980UUtGz-Xwj7xLsWDXRQqzCpP56G7VR2EMC1EbNRnoeJNBwEC7aySqzHCPXB4RQ5KbvLUrDKyY_Bo7oQnh40Wmnm92qQ/s1149/c++%20int%20range%20of%20values.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="460" data-original-width="1149" height="256" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixs9g6fcaFWJ48z-6RZuKJIizZTz1znaMDkToJwq5zET_Lqm2ErVgdRhSfsMhMQOLAsp3_Q4NHDMz5U_bZLhCVsSwY25Ldm980UUtGz-Xwj7xLsWDXRQqzCpP56G7VR2EMC1EbNRnoeJNBwEC7aySqzHCPXB4RQ5KbvLUrDKyY_Bo7oQnh40Wmnm92qQ/w640-h256/c++%20int%20range%20of%20values.jpg" width="640" /></a></span></div><span style="font-size: large;"><br /><div class="separator" style="clear: both; font-family: inherit; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKFYH6N2Ln-wl5fXHlgimQrdjStW1uEC5d3OkyhysTiCWy_d5Xebenam49n5JbfCMS35hp8EpCk9D4wdzakyCWznRNd5vpK2UEDZ17bb_vVjlJAIh9tCO8C2CYvvLpmTtJsRMQtpQO8GDi038A730902kiTcQYIEMZksLzNb-d6J7GkDCHnrkd_5I-gA/s1180/c++%20float%20double%20range%20of%20values.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="187" data-original-width="1180" height="102" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKFYH6N2Ln-wl5fXHlgimQrdjStW1uEC5d3OkyhysTiCWy_d5Xebenam49n5JbfCMS35hp8EpCk9D4wdzakyCWznRNd5vpK2UEDZ17bb_vVjlJAIh9tCO8C2CYvvLpmTtJsRMQtpQO8GDi038A730902kiTcQYIEMZksLzNb-d6J7GkDCHnrkd_5I-gA/w640-h102/c++%20float%20double%20range%20of%20values.jpg" width="640" /></a></div><br /><p class="MsoNormal" style="font-family: inherit;"><b><span style="line-height: 107%;"><u>Explanation:</u></span></b></p><p class="MsoNormal" style="font-family: inherit;"><span style="line-height: 107%;"><b>int Data
Type</b><o:p></o:p></span></p>
<p class="MsoNormal" style="font-family: inherit;"><span style="line-height: 107%;">Size 4
bytes i.e. 32 bits<o:p></o:p></span></p>
<p class="MsoNormal" style="font-family: inherit;"><span style="line-height: 107%;"><o:p> </o:p></span></p>
<p class="MsoNormal" style="font-family: inherit;"><span style="line-height: 107%;"><b>Total
numbers possible</b><o:p></o:p></span></p>
<p class="MsoNormal" style="font-family: inherit;"><span style="line-height: 107%;">1 bit = 2<sup>1</sup>
i.e. 2 numbers <o:p></o:p></span></p>
<p class="MsoNormal" style="font-family: inherit;"><span style="line-height: 107%;">2 bits =
2<sup>2</sup> i.e. 4 numbers<o:p></o:p></span></p>
<p class="MsoNormal" style="font-family: inherit;"><span style="line-height: 107%;">3 bits =
2<sup>3</sup> i.e. 8 numbers<o:p></o:p></span></p>
<p class="MsoNormal" style="font-family: inherit;"><span style="line-height: 107%;"><o:p> </o:p></span></p>
<p class="MsoNormal" style="font-family: inherit;"><span style="line-height: 107%;">32 bits =
2<sup>32</sup> numbers<o:p></o:p></span></p>
<p class="MsoNormal" style="font-family: inherit;"><span style="line-height: 107%;"><o:p> </o:p></span></p>
<p class="MsoNormal" style="font-family: inherit;"><span style="line-height: 107%;"><b>Unsigned int </b><o:p></o:p></span></p>
<p class="MsoNormal" style="font-family: inherit;"><span style="line-height: 107%;">Range 0
to 2<sup>32</sup> – 1<o:p></o:p></span></p>
<p class="MsoNormal" style="font-family: inherit;"><span style="line-height: 107%;"><o:p> </o:p></span></p>
<p class="MsoNormal" style="font-family: inherit;"><span style="line-height: 107%;"><b>Signed
int </b> </span></p><p class="MsoNormal" style="font-family: inherit;"><span style="line-height: 107%;">1 bit is reserved for sign<o:p></o:p></span></p>
<p class="MsoNormal" style="font-family: inherit;"><span style="line-height: 107%;">That’s why
usable bits are 31 bits<o:p></o:p></span></p>
<p class="MsoNormal" style="font-family: inherit;"><span style="line-height: 107%;">Range -2<sup>31</sup>
to 0 to 2<sup>31</sup>-1 <o:p></o:p></span></p><p class="MsoNormal" style="font-family: inherit;"><span style="line-height: 107%;"><br /></span></p><p class="MsoNormal" style="font-family: inherit;"><span style="line-height: 107%;"><b>Program Code: (datatypes.cpp)</b></span></p><p class="MsoNormal">#include<iostream></p><p class="MsoNormal">using namespace std;</p><p class="MsoNormal"><br /></p><p class="MsoNormal">int main()</p><p class="MsoNormal">{</p><p class="MsoNormal"><span style="white-space: pre;"> </span>int a;</p><p class="MsoNormal"><span style="white-space: pre;"> </span>signed int b;</p><p class="MsoNormal"><span style="white-space: pre;"> </span>unsigned int c;</p><p class="MsoNormal"><span style="white-space: pre;"> </span>short int d;</p><p class="MsoNormal"><span style="white-space: pre;"> </span>long int e;</p><p class="MsoNormal"><br /></p><p class="MsoNormal"><span style="white-space: pre;"> </span>char f;</p><p class="MsoNormal"><span style="white-space: pre;"> </span>signed char g;</p><p class="MsoNormal"><span style="white-space: pre;"> </span>unsigned char h;</p><p class="MsoNormal"><span style="white-space: pre;"> </span></p><p class="MsoNormal"><span style="white-space: pre;"> </span>float i;</p><p class="MsoNormal"><span style="white-space: pre;"> </span>double j;</p><p class="MsoNormal"><span style="white-space: pre;"> </span>long double k;</p><p class="MsoNormal"><span style="white-space: pre;"> </span></p><p class="MsoNormal"><span style="white-space: pre;"> </span>bool l;</p><p class="MsoNormal"><br /></p><p class="MsoNormal"><span style="white-space: pre;"> </span></p><p class="MsoNormal"><span style="white-space: pre;"> </span>cout<<"Size of int: "<<sizeof(int)<<endl;</p><p class="MsoNormal"><span style="white-space: pre;"> </span>cout<<"Size of signed int: "<<sizeof(signed int)<<endl;</p><p class="MsoNormal"><span style="white-space: pre;"> </span>cout<<"Size of unsigned int: "<<sizeof(unsigned int)<<endl;</p><p class="MsoNormal"><span style="white-space: pre;"> </span>cout<<"Size of short int: "<<sizeof(short int)<<endl;</p><p class="MsoNormal"><span style="white-space: pre;"> </span>cout<<"Size of long int: "<<sizeof(long int)<<endl;</p><p class="MsoNormal"><span style="white-space: pre;"> </span>cout<<"Size of long long int: "<<sizeof(long long int)<<endl;</p><p class="MsoNormal"><br /></p><p class="MsoNormal"><span style="white-space: pre;"> </span>cout<<"Size of char: "<<sizeof(char)<<endl;</p><p class="MsoNormal"><span style="white-space: pre;"> </span>cout<<"Size of signed char: "<<sizeof(signed char)<<endl;</p><p class="MsoNormal"><span style="white-space: pre;"> </span>cout<<"Size of unsigned char: "<<sizeof(unsigned char)<<endl;</p><p class="MsoNormal"><span style="white-space: pre;"> </span></p><p class="MsoNormal"><span style="white-space: pre;"> </span>cout<<"Size of float: "<<sizeof(float)<<endl;</p><p class="MsoNormal"><span style="white-space: pre;"> </span>cout<<"Size of double: "<<sizeof(double)<<endl;</p><p class="MsoNormal"><span style="white-space: pre;"> </span>cout<<"Size of long double: "<<sizeof(long double)<<endl;</p><p class="MsoNormal"><br /></p><p class="MsoNormal"><span style="white-space: pre;"> </span>cout<<"Size of bool: "<<sizeof(bool)<<endl;</p><p class="MsoNormal"><span style="white-space: pre;"> </span></p><p class="MsoNormal"><span style="white-space: pre;"> </span>return 0;</p><p class="MsoNormal"><span style="line-height: 107%;"></span></p><p class="MsoNormal">}</p>
<p class="MsoNormal" style="font-family: inherit;"><span style="line-height: 107%;"><o:p> </o:p></span></p>
<p class="MsoNormal" style="font-family: inherit;"><span style="line-height: 107%;"><o:p> </o:p></span></p></span><p></p><p><span style="font-family: inherit; font-size: large;"><br /></span></p><p><span style="font-family: inherit; font-size: large;"><br /></span></p><p><span style="font-family: inherit; font-size: large;"><br /></span></p><p><span style="font-family: inherit; font-size: large; line-height: 107%;"><br /></span></p><p class="MsoNormal"><span style="font-family: inherit; font-size: large; line-height: 107%;"><o:p></o:p></span></p><p><span style="font-family: inherit; font-size: large;"> </span></p><p></p>Parag Jambhulkarhttp://www.blogger.com/profile/13991750622483538113noreply@blogger.com0tag:blogger.com,1999:blog-913600556879440043.post-31745009129962690802022-10-06T23:31:00.004+05:302022-10-06T23:31:55.044+05:30C++ Array of Pointers | Array of Pointers in C and CPP<p> <span style="font-size: large;"> In this post, we will see C++ Array of Pointers | Array of Pointers in C and CPP </span></p><p><span></span></p><a name='more'></a><span style="font-size: large;"><br /></span><p></p><p><span style="font-size: large;"><b>Program Code: (pointers10.cpp)</b></span></p><p><span style="font-size: large;">//Array of Pointers</span></p><p><span style="font-size: large;">#include<iostream></span></p><p><span style="font-size: large;">using namespace std;</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">int main()</span></p><p><span style="font-size: large;">{</span></p><p><span style="font-size: large;"> int *p[5];</span></p><p><span style="font-size: large;"> //int a=1,b=3,c=2,d=7,e=6;</span></p><p><span style="font-size: large;"> int arr[5]={1,3,2,7,6};</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"> // p[0]=&a;</span></p><p><span style="font-size: large;"> // p[1]=&b;</span></p><p><span style="font-size: large;"> // p[2]=&c;</span></p><p><span style="font-size: large;"> // p[3]=&d;</span></p><p><span style="font-size: large;"> // p[4]=&e;</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"> for(int i=0;i<5;i++)</span></p><p><span style="font-size: large;"> {</span></p><p><span style="font-size: large;"> p[i]=&arr[i];</span></p><p><span style="font-size: large;"> }</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"> for(int i=0;i<5;i++)</span></p><p><span style="font-size: large;"> {</span></p><p><span style="font-size: large;"> cout<<"Value="<<*p[i]<<endl;</span></p><p><span style="font-size: large;"> }</span></p><p><span style="font-size: large;">} </span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"><b>Watch following video:</b></span></p><p><span style="font-size: large;"><b><br />
<iframe width="640" height="360" src="https://www.youtube.com/embed/KBw6B4e3vhs" title="" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</b></span></p><p><span style="font-size: large;"><b>Watch on YouTube: <a href="https://www.youtube.com/watch?v=KBw6B4e3vhs" target="_blank">https://www.youtube.com/watch?v=KBw6B4e3vhs</a></b></span></p>Parag Jambhulkarhttp://www.blogger.com/profile/13991750622483538113noreply@blogger.com0tag:blogger.com,1999:blog-913600556879440043.post-91233811249891259892022-10-06T23:03:00.003+05:302022-10-06T23:03:45.840+05:30C++ Pointer To Array of Objects | Pointer To Array of Objects in CPP<p> <span style="font-size: large;"> In this post, we will see C++ Pointer To Array of Objects | Pointer To Array of Objects in CPP </span></p><p><span></span></p><a name='more'></a><span style="font-size: large;"><br /></span><p></p><p><span style="font-size: large;"><b>Program Code: (pointers9.cpp)</b></span></p><p><span style="font-size: large;">//Pointer To Array of Objects</span></p><p><span style="font-size: large;">#include<iostream></span></p><p><span style="font-size: large;">using namespace std;</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">class Sample</span></p><p><span style="font-size: large;">{</span></p><p><span style="font-size: large;">public:</span></p><p><span style="font-size: large;">int x;</span></p><p><span style="font-size: large;">void show()</span></p><p><span style="font-size: large;"> {</span></p><p><span style="font-size: large;"> cout<<"Value of x is "<<x<<endl;</span></p><p><span style="font-size: large;"> }</span></p><p><span style="font-size: large;">};</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">int main()</span></p><p><span style="font-size: large;">{</span></p><p><span style="font-size: large;">Sample obj[5];</span></p><p><span style="font-size: large;">Sample *p; </span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">p=obj; //p=&obj[0]</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">for(int i=0;i<5;i++)</span></p><p><span style="font-size: large;">{</span></p><p><span style="font-size: large;"> p->x=i; //obj[0].x</span></p><p><span style="font-size: large;"> p->show(); //obj[0].show();</span></p><p><span style="font-size: large;"> p++;</span></p><p><span style="font-size: large;">}</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;">}</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"><b>Watch following video:</b></span></p><p><span style="font-size: large;"><b><br />
<iframe width="640" height="360" src="https://www.youtube.com/embed/ZWaCx_GueBs" title="" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</b></span></p><p><span style="font-size: large;"><b>Watch on YouTube: <a href="https://www.youtube.com/watch?v=ZWaCx_GueBs" target="_blank">https://www.youtube.com/watch?v=ZWaCx_GueBs</a></b></span></p><p><span style="font-size: large;"><br /></span></p>Parag Jambhulkarhttp://www.blogger.com/profile/13991750622483538113noreply@blogger.com0tag:blogger.com,1999:blog-913600556879440043.post-19506403480007571922022-10-06T21:43:00.004+05:302022-10-06T21:43:50.804+05:30C++ Pointer To Array | Pointer To Array in CPP<p> <span style="font-size: large;"> In this post, we will see C++ Pointer To Array | Pointer To Array in CPP </span></p><p><span></span></p><a name='more'></a><span style="font-size: large;"><br /></span><p></p><p><span style="font-size: large;"><b>Program Code: (pointers8.cpp)</b></span></p><p><span style="font-size: large;">//Array of Pointers</span></p><p><span style="font-size: large;">#include<iostream></span></p><p><span style="font-size: large;">using namespace std;</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">int main()</span></p><p><span style="font-size: large;">{</span></p><p><span style="font-size: large;"> int *p[5];</span></p><p><span style="font-size: large;"> //int a=1,b=3,c=2,d=7,e=6;</span></p><p><span style="font-size: large;"> int arr[5]={1,3,2,7,6};</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"> // p[0]=&a;</span></p><p><span style="font-size: large;"> // p[1]=&b;</span></p><p><span style="font-size: large;"> // p[2]=&c;</span></p><p><span style="font-size: large;"> // p[3]=&d;</span></p><p><span style="font-size: large;"> // p[4]=&e;</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"> for(int i=0;i<5;i++)</span></p><p><span style="font-size: large;"> {</span></p><p><span style="font-size: large;"> p[i]=&arr[i];</span></p><p><span style="font-size: large;"> }</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"> for(int i=0;i<5;i++)</span></p><p><span style="font-size: large;"> {</span></p><p><span style="font-size: large;"> cout<<"Value="<<*p[i]<<endl;</span></p><p><span style="font-size: large;"> }</span></p><p></p><p><span style="font-size: large;">} </span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"><b>Watch following video:</b></span></p><p><span style="font-size: large;"><b><br />
<iframe width="640" height="360" src="https://www.youtube.com/embed/Xltt1Ba-hyA" title="" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</b></span></p><p><span style="font-size: large;"><b>Watch on YouTube: <a href="https://www.youtube.com/watch?v=Xltt1Ba-hyA" target="_blank">https://www.youtube.com/watch?v=Xltt1Ba-hyA</a></b></span></p><p><span style="font-size: large;"><br /></span></p>Parag Jambhulkarhttp://www.blogger.com/profile/13991750622483538113noreply@blogger.com0tag:blogger.com,1999:blog-913600556879440043.post-78910221981869303722022-10-04T22:26:00.007+05:302022-10-04T22:26:49.005+05:30C++ For Each Loop | Range Based For Loop in C++ | Enhanced For Loop in C++<p> <span style="font-size: large;"> In this post, we will see C++ For Each Loop | Range Based For Loop in C++ | Enhanced For Loop in C++ </span></p><p><span></span></p><a name='more'></a><span style="font-size: large;"><br /></span><p></p><p><span style="font-size: large;"><b>Program Code: (loopstructure4.cpp)</b></span></p><p><span style="font-size: large;">#include<iostream></span></p><p><span style="font-size: large;">using namespace std;</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">int main()</span></p><p><span style="font-size: large;">{</span></p><p><span style="font-size: large;"> //int arr[]={20,10,40,50,25};</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"> for(int i: {20,10,40,50,25})</span></p><p><span style="font-size: large;"> {</span></p><p><span style="font-size: large;"> cout<<"Value="<<i<<endl;</span></p><p><span style="font-size: large;"> }</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"> char x[]={'a','b','c','d'};</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"> for(char i:x)</span></p><p><span style="font-size: large;"> {</span></p><p><span style="font-size: large;"> cout<<"Character ="<<i<<endl;</span></p><p><span style="font-size: large;"> }</span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;">} </span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"><b>Watch following video:</b></span></p><p><span style="font-size: large;"><b><br />
<iframe width="640" height="360" src="https://www.youtube.com/embed/_NSuwIJG8tw" title="" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</b></span></p><p><span style="font-size: large;"><b>Watch on YouTube: <a href="https://www.youtube.com/watch?v=_NSuwIJG8tw" target="_blank">https://www.youtube.com/watch?v=_NSuwIJG8tw</a></b></span></p>Parag Jambhulkarhttp://www.blogger.com/profile/13991750622483538113noreply@blogger.com0tag:blogger.com,1999:blog-913600556879440043.post-54843001457439507762022-10-03T22:57:00.002+05:302022-10-03T22:57:29.349+05:30C++ Control Structures Part 3 : Loop Structure | for, while, do while | while & do while Difference<p> <span style="font-size: large;"> In this post, we will see C++ Control Structures Part 3 : Loop Structure | for, while, do while | while & do while Difference </span></p><p><span></span></p><a name='more'></a><span style="font-size: large;"><br /></span><p></p><p><span style="font-size: large;"><b>Program Code: (loopstructure1.cpp)</b></span></p><p><span style="font-size: large;">#include<iostream></span></p><p><span style="font-size: large;">using namespace std;</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">int main()</span></p><p><span style="font-size: large;">{</span></p><p><span style="font-size: large;"> int i;</span></p><p><span style="font-size: large;"> for(i=0;i<5;i++)</span></p><p><span style="font-size: large;"> {</span></p><p><span style="font-size: large;"> cout<<"Square of "<<i<<"="<<i*i<<endl;</span></p><p><span style="font-size: large;"> }</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"> //infinite loop</span></p><p><span style="font-size: large;"> /*</span></p><p><span style="font-size: large;"> for(;;)</span></p><p><span style="font-size: large;"> {</span></p><p><span style="font-size: large;"> cout<<"Hello World"<<endl;</span></p><p><span style="font-size: large;"> }</span></p><p><span style="font-size: large;"> */</span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;">}</span></p><p><b style="font-size: x-large;">Program Code: (loopstructure2.cpp)</b></p><p><span style="font-size: large;">#include<iostream></span></p><p><span style="font-size: large;">using namespace std;</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">int main()</span></p><p><span style="font-size: large;">{</span></p><p><span style="font-size: large;"> int i=0;</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"> while(i<5)</span></p><p><span style="font-size: large;"> {</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"> cout<<"Square of "<<i<<"="<<i*i<<endl;</span></p><p><span style="font-size: large;"> i++;</span></p><p><span style="font-size: large;"> }</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"> //infinite loop</span></p><p><span style="font-size: large;"> /*</span></p><p><span style="font-size: large;"> while(true)</span></p><p><span style="font-size: large;"> {</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"> cout<<"Square of "<<i<<"="<<i*i<<endl;</span></p><p><span style="font-size: large;"> i++;</span></p><p><span style="font-size: large;"> }</span></p><p><span style="font-size: large;"> */</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: x-large;"></span></p><p><span style="font-size: large;">}</span></p><p><b style="font-size: x-large;">Program Code: (loopstructure3.cpp)</b></p><p><span style="font-size: large;">#include<iostream></span></p><p><span style="font-size: large;">using namespace std;</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">int main()</span></p><p><span style="font-size: large;">{</span></p><p><span style="font-size: large;">int i=0;</span></p><p><span style="font-size: large;">do</span></p><p><span style="font-size: large;">{</span></p><p><span style="font-size: large;"> cout<<"Square of "<<i<<"="<<i*i<<endl;</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"> i++;</span></p><p><span style="font-size: large;">} while (i<5);</span></p><p><br /></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;">} </span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"><b>Watch following video:</b></span></p><p><span style="font-size: large;"><b><br />
<iframe width="640" height="360" src="https://www.youtube.com/embed/VsiXwVTcco0" title="" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</b></span></p><p><span style="font-size: large;"><b>Watch on YouTube: <a href="https://www.youtube.com/watch?v=VsiXwVTcco0" target="_blank">https://www.youtube.com/watch?v=VsiXwVTcco0</a></b></span></p>Parag Jambhulkarhttp://www.blogger.com/profile/13991750622483538113noreply@blogger.com0tag:blogger.com,1999:blog-913600556879440043.post-90034454282779269152022-10-02T16:25:00.002+05:302022-10-02T16:27:23.568+05:30C++ Passing Parameters to Base Class Constructors | Passing values to base class constructor in C++<p><span style="font-size: large;"> In this post, we will see C++ Passing Parameters to Base Class Constructors | Passing values to base class constructor in C++</span><span style="font-size: x-large;"> </span></p><span><a name='more'></a></span><p><br /></p><p><span style="font-size: large;"><b>Program Code (inheritance7.cpp) </b></span></p><p><span style="font-size: large;">/*C++ Passing Parameters to Base Class Constructors*/</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">#include<iostream></span></p><p><span style="font-size: large;">using namespace std;</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">class A</span></p><p><span style="font-size: large;">{</span></p><p><span style="font-size: large;"><span style="white-space: pre;"> </span>public:</span></p><p><span style="font-size: large;"><span style="white-space: pre;"> </span>A()</span></p><p><span style="font-size: large;"><span style="white-space: pre;"> </span>{</span></p><p><span style="font-size: large;"><span style="white-space: pre;"> </span>cout<<"In A class constructor"<<endl;</span></p><p><span style="font-size: large;"><span style="white-space: pre;"> </span>}</span></p><p><span style="white-space: pre;"><span style="font-size: large;"> </span></span></p><p><span style="font-size: large;"><span style="white-space: pre;"> </span>A(int x)</span></p><p><span style="font-size: large;"><span style="white-space: pre;"> </span>{</span></p><p><span style="font-size: large;"><span style="white-space: pre;"> </span>cout<<"In A class constructor with value="<<x<<endl;</span></p><p><span style="font-size: large;"><span style="white-space: pre;"> </span>}</span></p><p><span style="font-size: large;">};</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">class B: public A</span></p><p><span style="font-size: large;">{</span></p><p><span style="font-size: large;"><span style="white-space: pre;"> </span>public:</span></p><p><span style="font-size: large;"><span style="white-space: pre;"> </span>B()</span></p><p><span style="font-size: large;"><span style="white-space: pre;"> </span>{</span></p><p><span style="font-size: large;"><span style="white-space: pre;"> </span>cout<<"In B class constructor"<<endl;</span></p><p><span style="font-size: large;"><span style="white-space: pre;"> </span>}</span></p><p><span style="white-space: pre;"><span style="font-size: large;"> </span></span></p><p><span style="font-size: large;"><span style="white-space: pre;"> </span>B(int y):A(7)</span></p><p><span style="font-size: large;"><span style="white-space: pre;"> </span>{</span></p><p><span style="font-size: large;"><span style="white-space: pre;"> </span>cout<<"In B class constructor with value="<<y<<endl;</span></p><p><span style="font-size: large;"><span style="white-space: pre;"> </span>}</span></p><p><span style="font-size: large;">};</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;">int main()</span></p><p><span style="font-size: large;">{</span></p><p><span style="font-size: large;"><span style="white-space: pre;"> </span>B obj;</span></p><p><span style="font-size: large;"></span></p><p><span style="font-size: large;">}</span></p><p><span style="font-size: large;"><br /></span></p><p><span style="font-size: large;"><b>Watch following video:</b></span></p><p><span style="font-size: large;"><b><br />
<iframe width="640" height="360" src="https://www.youtube.com/embed/oTGUKXH2JpA" title="" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</b></span></p><p><span style="font-size: large;"><b>Watch on YouTube: <a href="https://www.youtube.com/watch?v=oTGUKXH2JpA" target="_blank">https://www.youtube.com/watch?v=oTGUKXH2JpA</a></b></span></p>Parag Jambhulkarhttp://www.blogger.com/profile/13991750622483538113noreply@blogger.com0