 online courses are dead and you should hello everyone i'm sanjay gupta i welcome you on sanjay gupta tech school so i hope you are doing great and uh yesterday we started apix programming sessions so today also we are going to learn the same topic so before starting the topic i just want to welcome you in the session and i hope you liked yesterday's session so with the same energy i will be delivering today's session and i'm going to revise few topics those we discussed yesterday so very warm welcome to everyone those who have joined the session and uh welcome to those as well who are following the sessions through recordings so i appreciate live audience as well as those who are following the recorded videos and appreciate the efforts of those who are doing regular practice okay so with this note so once again welcome to everybody and today's topic that we are going to discuss so today we will be discussing two things first we'll be discussing about object oriented programming concepts oops concepts and then we'll discuss data types so i won't be covering all the data types together we'll see primitive data type today so we will be understanding the theoretical concept as well as we'll be understanding the uh like how practically we can implement those okay so i'm just starting with today's session so this is day 33 of this sage force learning bootcamp and i think with this speed if we go so uh soon we'll be touching 100 days mark right as i'm going to cover all the topics okay so those who don't know about me so this slide is for you if you if you join today so you can just go through with this slide and uh you can know about me so i have both education and it industry experience and uh because of that when i learned sales force completely so i just applied my teaching methodology and started a creation of content and this year i decided to go live and interact with people and make them learn sales force in easy way right so now moving forward so we are following all these virtual learning best practices so i can see uh telegram group is like uh having more than uh 1000 people and uh lots of learners are discussing doubts so that's that is great if you have not joined that group please do and uh you can also discuss your queries there and uh if you miss any sessions or recordings are available and try to do all the practice so that uh you can just understand the core concepts properly so this slide is very important and i just love the word consistency so you can see from last two months i am consistent every week i am doing the session different different topics i am covering so i just expect consistency from you as well so if you will be consistent throughout the bootcamp if you will be doing all the practice regularly so i bet you will be able to learn all the things related to sales force and you will be able to uh prepare yourself for interviews jobs right so whenever there will be any opportunity so you will be having enough confidence because we are doing two-way practice we are doing practice through daily exercises and we are doing a project as well right so this is important for everybody and uh as you know like our sessions are divided into two parts so i'm doing sessions in two ways like first i am going to explain all the concept and uh then i'm going to give you demo and at last we are doing all the q and a's so i just shared the telegram group link in the chat so that you can just join that and if you have any doubt you can discuss going forward so this is sales force development bootcamp timeline so we are in week nine so week 10 week 11 are also dedicated for apex programming so do follow all the sessions so that you can strengthen your skills on apex programming and just follow all the social media platform because i am sharing all the knowledge everywhere and all the notifications if you want session reminders if you want so you can follow my this sanjay gupta tech school on youtube linkedin instagram and telegram right so i think nowadays folks are using these apps frequently so that's why i'm sharing all the reminders there so that you don't miss any session okay so i think wasu with this link if you join so there are two groups one is broadcast and one is like conversational group so you can join both so the link which i shared right now it is for conversation there is another which is for broadcast where you can just read the masses you cannot send any masses so just search sanjay gupta tech school you will see two like two groups there one is for conversation and one is for broadcasting where you are just a member to read the information okay so i hope lots of people are waiting for upcoming bootcamp so in next month i will be launching bootcamp number two that will be related to cyber security so in sales force we have cyber security as a job profile so that cyber security bootcamp will help you to have a role on sales force ecosystem as a cyber security export and cyber security is related to other ecosystems as well so that will be common for all and like you can just go through and try to learn those skills as well and that will be happening on different time so that you can attend both the sessions right and at max i will try to have two sessions in a day like one for sales force and one for any other technology so that you can focus on both so with this note i am just starting today's session so you can see first of all we are going to discuss about object oriented programming concepts right so yesterday also we discussed about class classes also related to objects so we have this object oriented approach that is more around classes so basically if we talk about so if in interview someone asks what is object so your answer will be an object is a real world entity right an object is a real world entity basis on that you implement the solution so yesterday i gave you an example like if we have a rectangle so rectangle is an object which can be having some attributes some behaviors so that rectangle is a real world problem that we need to implement right so we will be discussing class again in today's session but prior to that we have three core concepts those are related to object oriented programming okay so i will try to explain these concepts with the help of a real world example so here you can see first point is encapsulation right so we need to understand the word encapsulation and basically this encapsulation word is framed with the help of capsule so you might have used capsule as a medicine right so capsule basically has a plastic cover and in that plastic cover we have medicine so that plastic cover is basically working as a capsule and inside that we have medicine so that plastic cover is protecting our medicine right which is inside it so that whole process is basically known as encapsulation so in programming encapsulation is implemented with the help of class right so in class what we do we implement some variables we implement some methods together so basically class is a collection of variables and methods so class basically is an example of encapsulation right so encapsulation means collection so it it is available everywhere so if you are using your mobile phone so mobile phone body is your like like protection and inside that you have different parts okay so those parts are collected through that body right so that body is encapsulating all the other parts so that you can protect them from outside environment right so if i if i take you to this developer console so here you can see if we pick this example so here we have this class rectangle with constructor and here we have some variables we have constructor then we have method one we have method two so all these things variable constructor and methods these are part of a class so class is basically containing all these as a member so here class is working as a capsule right so that's why this is encapsulation okay so example of encapsulation is your class which is containing all the things inside it now second is abstraction right so abstraction basically hides the process and focus on what to do so once you implement your class and if you go here on anonymous window so on anonymous window what we do we just call the method on anonymous window what we do we just call the method so while calling the method so for example we have two developers developer one implemented the class and developer two is calling the methods of that class so developer two only know the name of class and the name of the methods developer two doesn't know the actual implementation of the methods still developer two will be able to call those methods without knowing the exact detail right so in real world also abstraction exists how so abstraction means hiding the process and we need to focus on what to do right so for example if you use any device so you don't know how actually it works so if i take example of internet so if you are using internet so you don't need to know how actually internet works you are just using internet for your day-to-day activities so that is basically abstraction okay so if you are focusing on what to do instead of how that is happening so that process is known as abstraction so now you will say in class how it is implemented so once your class is implemented and after implementation someone else or maybe you are calling the methods so at the time of method call if you don't know the exact process that is implemented in that method still you will be able to execute that process okay so in real life everywhere abstraction is available so if you go to atm machine you withdraw amount so you don't know the process how money is withdrawn your focus will be how like how i can get the amount right you you you don't want to learn how that is actually working because that is not your not your concern so that is actually abstraction okay so once class is implemented and you are calling the method of that particular class so that process is basically known as abstraction and third key concept is inheritance so you can see encapsulation and abstraction both we used yesterday and in every example we will be using both encapsulation and abstraction inheritance means if you have two classes and you want to reuse the feature of one class into another in that case we basically implement inheritance so as of now we won't be focusing on inheritance and in apex we rarely use inheritance but this is a prime feature of object oriented programming so you should know what is inheritance so you can simply learn if you want to reuse features of a class into another class so that is basically known as inheritance and for inheritance real-life example is like father or son so father's all property automatically inherited by their son or daughter right so that is basically inheritance so the property which is used by the parents that will be reused by their children right so that is basically known as inheritance okay so these are key features of object oriented programming and in interview generally this question is asked to the freshers like what are features of object oriented programming so you can just explain these now these are the points that we discussed yesterday so we can simply revise these points so like today also I saw someone asked like what type of programming language is apex so apex is basically object oriented programming language whenever you heard object oriented programming language it means your code will be implemented with the help of class without class you won't be able to implement any method or any logic right so an object is a real world entity or problem so I gave you lots of example right and yes so Shiva is saying polymorphism is also there so we will be yeah that is also a prime feature but right now we are not using that feature so whenever we will be using we'll discuss that as well so polymorphism says with same name we can define multiple methods and they can have different parameters so that is basically known as polymorphism right so that we are not implementing as of now so later on I will be covering that as well then here you can see third point says to represent object logically we implement a class so whenever you are working with object oriented programming so you just need to identify the object the problem and basis on that problem you will be implementing your class and so here like if I go forward so class forms base for object oriented programming right so now I think you are able to see last point as well so basically class is a base for object oriented programming and class is a collection of variables and methods right so what you will be defining in your class those are variables and methods and any number of variables any number of methods you can define in your class as per the requirement and variables are attributes properties of an object whereas methods are known as behaviors and once class is created then we can use it as a data type to create an instance so that we also implemented yesterday and I can see Ajit is saying overloading overriding so these are basically not preferably preferably used as of now so whenever we will be using any of these features so I will be explaining okay so some of the object oriented programming features we don't use here so if we go further and before moving further I just want to thank Pawan he just shared 50 rupees with me so thank you for your small donation and so if you if you see this slide so we just gone through with this yesterday as well so on left you can see it is designed as a real world problem and on right hand side it is designed as how it will be implemented with the help of class right so I hope now you can just imagine inside class mainly we will be focusing on the method implementation yes Prashant interface also I will be discussing later on so right now I just describe only those features we which we will be focusing okay so interface will be coming later on so yesterday we implemented classes but I didn't explain you how we can pass parameters so that we will be discussed we will be discussing today then this way we created instance so here class name is working as a data type through that we can create instance so this is the example that we used and I also explained two different ways to implement methods one is static and another one is non-static okay so this I gave you as an assignment yesterday so I am going to explain this with the proper implementation so that whatever you have implemented you can compare whether you have implemented it correctly or not so we need to calculate area and parameter of square so our object is basically square and we need to focus on two entities area and parameter and first of all we need to implement it as non-static method okay so I am going to implement it so clicking on file so first of all I am refreshing it so that I can make sure it is fresh session so I am clicking on file new epic class and then here file name is square so square class will be created okay inside this class I can define two methods so I am writing public void area and here I need to specify a and here I am putting value as five then I need to create so instead of integer I am using decimal and one more variable I need that is area then area equals to a into a right so area of square is basically a square so that I implemented here now if I want to show this as a result so here I am using it like this okay so whatever I wrote in single quotes will be displaced as is then for variable and this text separation I am using plus sign so this is a non-static method now I am just copying and pasting it so that I can simply modify this so here I am writing perimeter and formalize four into a so this way quickly I implemented this method as well okay so here you can see we have a class and this class is having two methods right so we have total two methods so this is our method number one and this is our method number two right okay so so in in apex we cannot use int in place of int you will be using integer so integer decimal these are basically predefined classes that we are using here and these are actually data type so decimal is data type here that we will be discussing later on as well like this is part of primitive data type so I think with this way you are able to understand how we can create methods and how we can write the business logic inside the method okay now I am just saving this code I am pressing control plus E so that this window is available and now here I am going to execute the code okay so I am just removing all the code which was implemented here I am going to create new statements so square s equals to new square and then s equals to area and s equals to parameter so this way these two methods I called so these are basically method call and at this line we are creating instance of class right and here this class name square is a data type so remember whenever you implement a class so name of class works as a data type okay so here like I declared this decimal a equals to five and area so in the same line in the same line I declared two variables one is a and another one is area you can see here comma is available for separation and a is having five but area is having nothing area will be having value through this a into a so this way actually it is working okay so why this is non-static because I have not used static keyword if we use static keyword so method will become static otherwise method will be non-static right so I hope all the basics I cleared now here we have a checkbox open log and execute and execute highlighted so here we have only three lines so we can execute them all I am just clicking on execute statement and this time this checkbox is checked so logs will be opened automatically in next run I will uncheck it and will show you how you can open log manually so I'm just clicking on execute so here you can see logs are opened automatically and if you click on this debug only so through this debug only you will be able to see the results so here we are seeing line number seven and 14 so on if you if you go to the code so on line number seven and 14 system dot debug is available that's why here it is showing it like this way no very goody a variable doesn't have two value a variable is having five a is having five and area is another variable so here we have created two variables if you want to create it like this that is also possible it is also possible right so you can create variables in different lines if you want to create similar type of variables so you can create them in same line using comma this way so both are correct okay so this way I hope you understood how we can implement methods non-static methods now I'm going to show you how we can add constructor in non-static method so if you want to use constructor so basically a constructor we used to initialize variable of the class so now decimal a I am declaring here and I am removing it from here right so this decimal a I declared outside the method so if you create any variable here so this variable can be accessed by any method of that particular class right now if you want to fill a value into this variable so you can create two types of constructor one is default so first I'm going to create a default constructor so in default constructor like constructor name will be same as class and here you can write a equals to five so this is our default constructor okay so this is our default constructor which is initializing a as five now if you calculate area so here a will be used as five if you calculate parameters so automatically that same a will be having value as five okay okay uh someone is asking what is void so void is a return type so here I'm writing void is a return type and if we don't want to return a value to another method then we write void so basically what what we can do whenever we are implementing more than one methods so from one method we can pass value to another method right so if you don't want to pass value from one method to another method so in that case you will be using void so void is basically known as return type like what this method can return to any other method so if you don't want to return any value so you will be using void uh yes akula instead of area we can use variable b as well so but I would say variable name should be significant you cannot use any variable name so it should be significant so yeah yes siva so here this decimal a this variable we are declaring as a class level okay so it is declared as a class level that's why it is accessible in each method we can declare variable in method itself like we did earlier so in that case that that variable will be limited to that particular method right so I think this is clear now through constructor we are implementing this now if I execute this so this this process will be same no change will be required and you don't need to write any additional statement for calling the constructor so whenever you create instance of the class so here constructor will be called automatically right so whenever you in create instance of the class so at that line your constructor will be called automatically you don't need to write any additional statement so now we need to execute all the lines so I'm unchecking this checkbox and clicking on execute so this time you can see logs are not opened so just click on this small icon it will open this and here you need to click on first tab that is logs and here you can see two logs are available because we executed code twice so first log we already viewed second log you can see it is unread so you can just double click on it so this log will be opened and here if you click on debug only so you will be able to see the results now system.debug is available at line number 14 and 20 if we go to code so you can see line number 14 and 20 both are having this debug so same result is available here as well okay so this way I showed you how we can implement default constructor so a few folks are asking what is the use of constructor so basically constructor is initializing this class level variable so through constructor we can set this value and this variable we can use throughout the class in any method and if you are not getting it clearly so don't worry we won't be using constructor like more we will be implementing non-static method where we won't be preferring constructor but you should know what is constructor that's why I am just explaining it because it is part of object oriented programming approach now in place of this I am going to convert it into parameterize so I am making it parameterize constructor so right now what will happen if we create any default constructor so whatever time you execute your code a will be initialized with five always this is the drawback of default constructor now every time whenever you want to create instance so for example I am going to create one more instance if I paste it here I am creating s1 and I am calling methods like this so we created one instance as s and we created another instance as s1 so now if we execute this whole code so two instance will be created and both the instances will be having a as five right so this is the issue now if you want different values inside a so here what you can do you can create a decimal and you can just receive a value into val variable and you can assign it so this val is a variable name it can be anything right and this val you can assign into this now here one more thing is you may ask can we use a here as well like this I saw in telegram few folks were discussing about this so if you have this class variable as a and this parameter as a so with class variable you can write a keyword that is this this okay so what does it mean so this dot a is representing this class label variable and here whatever parameter we are using that we are using directly so whatever value you will be passing into this a variable it will go to the class variable so to distinguish class level variable with the constructor parameter with class level variable we actually use this dot okay so this is the purpose of using this now I am just saving this code and I am going to execute so from here I am passing six from here I am passing eight right so two different values I am passing for calculation now I just want to execute both so I am checking this checkbox and clicking on execute so whole code will be executed so code will execute twice two results are here 14 and 20 lines are displaying through two results for six it is showing 36 and 24 for eight it is showing 64 and 32 right so this way you can create parameterized constructor so that from calling or instance creation you can pass different values right so this way I hope you understood how we can create parameterized constructor I explained the use of this as well now if we go further so we need to implement static method so in case of static method what will be the difference in case of static method you don't need to write this statement for instance creation you can directly call the methods with the name of class right so now I am going to remove all these so here I am going to use static okay I just use static here I am using static here and here I am just writing a equals to five here also equals to five so this way now these two methods are static okay so if you create any method with this static keyword so it becomes static method logic will be same logic will be same and in case of static method whatever variables you need for calculation you need to declare them here only directly okay and do the calculation display the result similarly second method it is also static now what you need to do from here how it will be called so just write name of class and then method area then square and method parameter right so this way these two statements are available with the name of class we are calling the method and this time I am clicking on execute highlighted okay so there is some catch okay so why it is showing added so here see carefully I didn't save this class that's why it is showing this asterisk so if this asterisk is available it means you didn't save your class so I'm going to save this class so closing it pressing ctrl s now it is saved again I am going here so these two lines are already selected clicking on execute highlighted these are executed and log is open I am just clicking on debug only and here you can see the result 25 and 20 line number 8 and 14 okay so line number 8 is having system dot debug and line number 14 is having system dot debug so this is the approach that we will be using in most of the classes so always we will be implementing static methods right so if you are struggling with constructors so no need to worry in in few of the classes you need to use constructor in 90 to 95 percent classes you will be implementing methods like this because we won't be creating instance we will be calling methods directly with the name of class right so in trigger like later on we will be working with trigger so in trigger also we will be doing same we'll be creating all the methods as static and we'll be calling them directly with the name of class okay so I can see there are some questions so maybe I will be picking them later on because it will like discontinue the rhythm of the session so I'm just completing all these together so I just explain static static I think straightforward so non static methods if you write with static keyword becomes static method and static methods you can call directly with the name of class no need to create instance now last is we can call static method and we can pass parameters as well how so here I'm writing decimal and then I'm receiving value into well or or you can write a as well so from here I'm remove removing it so decimal area a into a and similarly from here I'm just writing it here so this way you can just pass the parameters right this way you can just pass the parameters so what is happening this is a parameter which we are receiving into a so if you are writing a here so you need to define its data type as well so right now a is of type decimal whatever value will be available into a that you can use inside this whole method here we are multiplying this a into a result will be into area so if a is declared here so you don't need to declare it here as well okay because it is already declared here now you might be thinking from where a will be receiving the value so a will be receiving value from here so you can pass different values as well so for area you are passing six for parameter you are passing eight so six and eight six will go here and calculate area accordingly then eight will go here and calculate parameter accordingly so this is also used in real life so whenever you will be implementing any method so that method can receive parameters as well so in trigger we will be using this approach so whenever we will be calling the method so from that method call we can pass the values like we are doing here so these are method calls right and from this method call we are passing the parameters so like we are calling static methods and in those static methods we are passing parameters as well now if i execute highlighted so log will open and here you can see results are available 36 and 32 okay so this way i hope you understood this example very well i tried to explain each and everything properly okay so moving forward now here if you see how many keywords we have used in this code so we use public class void static these are keywords so keywords are the reserve words and these words you cannot use as a variable name so if you want to create any variable you cannot use these as a variable because these are reserve words right now we are going to discuss about the data types so in apex we have these many data types so we have primitive data types so in today's session i will be just covering the primitive data type so in primitive we have integer double string long date id boolean and more then we have s object so that we'll be discussing in tomorrow's session like whatever s object we have created s object means Salesforce object it can be custom or standard so you can use those objects for variable creation then we have collections list set and map that we'll be discussing we have enum we we can use apex classes as data type as well right so if we see this example so here we are using this apex so square is a apex class and here square we are using as a data type okay so user defined apex classes and system supplied means predefined apex classes both we can use as a data type so that we can create the variables okay so someone is asking in static parameter we have not used constructor but how can we call so whenever you will be creating static method so constructor won't be required because in case of static you are not creating any instance okay so generally in static we don't create instance and if you create instance then only your constructor will be called so in case of not in case of static method we generally don't prefer constructor right so these are the primitive data types those are available boolean can store true and false integer can store any integer value decimal any value where we have decimal point then we have string so this is important to know in apex all the strings you will be enclosing in single quotes and if you use id so id also you need to enclose in single quotes okay so now i'm going to explain it with the help of an example let me create a class where i can show you all the examples together so i'm creating a class demo apex and here i will be creating different methods so public static void method one so here i'm going to create those variables with the help of primitive data type so i'm using boolean so let's say is active here i'm assigning true okay and now if you want to display its value or you want to apply any any operation so value of is active equals to then plus then is active so this way you can display so this is a simple example how you can use it then if you want to use a string so public static void then method two and here i'm writing string so here let's say i'm writing my name sanjay so i'm creating two strings f name and comma l name so here i'm writing gupta so this way two strings are available right f name and l name and both are having more than one characters but these are enclosed in single quotes now if you want to display them together how you will be writing so system dot debug so here i'm writing name equals to right so here plus then f name then plus or space then plus l name okay so what will happen this name equals to will display as is then after this equals to there is a space then first name will display then a little bit space one space and then last name so if you are using variables so there is no need of single quotes if you are using any text then it should be enclosed in double quotes and for separation you will be using plus sign okay so i'm just saving this code and we'll be executing it both the methods are static so what i can do i can just call these methods through class name so demo epics dot method one demo epics dot method two and i can call them execute highlighted so locks are opening if i click on this debug only so here i will see the result so value of is active true the name equals to sanjay and then you can see here we have some space and then good so this way result will be displayed okay so these are primitive data types that you can use now if you want to show idea of particular records so you can create one more method method three so why i'm creating separate method so that you can understand the implementation approach of method so as much methods we will be defining you will be getting familiar with these so here i'm going to create id so acc id equals to id we need to enclose in single quotes and like how we can identify id of particular records so just open a record here we are on this account record if you go to this url so here will be the id just copy it and you can paste it this way if you want to store id into epics so you can just use this id variable but we never hardcore id in the code so that is not as per best practice but in in any code if you want to store any id hard coded id so this way you can so we are just discussing this primitive data type later on we will be we won't be assigning these id's directly we'll be receiving those id through different approaches okay now if you want to display it on inside the log so you can so id equals to and then plus acc id this way you can display i'm just saving it and i'm going to run it so we have one more method so i'm going to run these together and clicking on execute highlighted so all these will be executed and you will see the results right so through this way we just tested all the data types integer and decimal we already used in previous examples so i think you are already familiar with these so if we go further so here we have another example so here we need to create a class where we need to perform these four operations on two numbers addition subtraction multiplication and division and we need to implement this through static methods and like few or you can say two you can define static and two you can define static but they will be receiving parameter from method call okay so now i'm going to implement the solution for this requirement so you can just go through again we'll be creating a class to perform following operations on two numbers addition subtraction multiplication and division so it means there will be total four methods right so here i'm going to create new class i'm naming it as calculator and here i will be implementing four methods okay so here you can see one one more thing you need to remember and i don't know if you are focusing or not so see the naming convention if i focus you on this so here i'm using proper naming convention so whenever you create any class and if that class name is having multiple words or one word so each words first letter should be capital so here rectangle r is capital static s is capital and demo d is capital so this should be the naming convention for all the class names right and for method of like if you have multiple words so let's say area of rectangle so this way you will be writing there are three words so first word will be totally small second word onwards first letter of each word should be capital this is known as camel case notation similar to this variable whenever you are creating variable so you will be applying this approach so you can see here i created a variable acc id so acc isn't small but id i is capital right so let's say i'm creating a variable first name so it should be like this last name it should be like this okay so variable and methods should be following camel case first word complete small second word onwards first letter should be capital of each word and in case of class each words first letter should be capital so here you can see demo apex is available so d and a are capital so this is naming convention and which is part of best practice you need to follow this and whatever simple to simple example if you are implementing so you need to apply all the best practices okay you cannot write anything as per your wish so it should be appropriate so now here i'm going to implement calculator so here also i'm applying all the naming convention now two methods i will i will be defining where variable i will be creating and in two methods i will be receiving values from method call so here i'm creating integer variable one equals to five variable two equals to ten right i need to calculate some so here i'm creating one more variable that is some now some equals to variable one plus variable two and if you want to display it on the ur so sum equals to or you can say addition equals to then here variable name is some you can display it like this okay so this is our first method that i implemented now what you can do simply copy and paste it and you can create subtraction and here you can write minus and here subtraction variable names you need to modify okay so here you can see in this line i just created three variables where one where two and some here also where one where two and some so this way in single line you can create any number of variables if data type is same right so this way two methods are created now i'm going to create one more method in this method like it will be multiplication in this method variables values i'm not going to define here instead i am going to write them here integer variable one integer variable two and it will be multiplication and here i'm going to apply multiplier and multiplication okay so these two methods having their own variables and values this method will be receiving value when we will be calling this method right and similar to this i'm going to create one more method so it will be for division and here i'm writing dev divide dev division dev so this way i i'm just showing you the implementation in such a way so that these two methods won't be receiving any value and calculation will be done and these two methods will be receiving values and calculations will be done okay and you can do vice versa as well and with these two methods also you can receive values from method call right so it don't think for two methods this rule will be same and remaining two methods this rule will be same for demonstration purpose i did this but in real time you can apply any approach whatever is the required okay so this way these four methods are implemented now moving here and i'm going to call them so i'm just erasing it so calculator dot addition this way you will be calling first method then calculator dot subtraction then calculator dot multiplication here you can see we need to pass two values variable one variable two so i'm passing 10 and five then calculator dot division here also we need to pass two values so i'm passing 20 and 10 okay so two methods we need to pass the parameters these are parameter values and two methods we are calling directly without passing any parameter okay so this will depend on your requirement which is a suitable as per the logic okay generally we prefer passing parameter and sometime we don't need to pass parameter so we can leave them blank as well so i'm just clicking on execute so all four methods will be executed and here in the debug you can see the result so addition is 15 because 10 plus 5 so 15 is displayed subtraction 5 minus 10 so it is minus 5 multiplication 50 because we passed 10 5 and division will be 2 because we passed 20 and 10 so this way these calculations are available okay so i hope you understood the implementation and you can also implement this in your like developer console so that you can understand right so this is all for today's session i hope today i went slow explained everything in more detail so that you can understand the things and i can see someone is appreciating me so i greatly appreciate you and i'm a big fan thank you your courses on udemy helped me land a system admin job for a company that uses sales force for their business thank you blessings to you sir thank you and you can see people are asking is the job available in sales force ecosystem so you can see this is the real example in front of you we just ended the session and someone is sharing he got the job so many congratulations and this i think motivates to other people and these days you are experiencing recession so recession is the best time to learn new things right because recession won't be forever it will end soon so in the recession time if there are less opportunities so you can more focus on the learning and whenever learning is available free so that is the golden time for you so you have time you have learning through my sessions so prepare yourself properly so that whenever there will be lots of opportunities so you will be prepared well enough and you will be directly going for the interviews and you will be having the jobs right so i hope you enjoyed the session and someone is saying mazaga anus thank you so i i just tried to explain it in very detail and easy way so that you can understand the things and if you go with the exercise so here also these examples are available so whatever i demoed i just mentioned here so just go through the recording and implement everything in your system so that you can understand as well now if you have any question so ask them again right i'm not scrolling back to the chat if you have any questions so just ask them fresh so that i can answer you and thank you everybody thank you asset thank you nithin thank you jyothi thank you uncle nerdan amit soji very goody okay satya is having can we mention multiply and division in uh bracket as like variables yes yes satya we can do so whenever you will be practicing so you can try these different approaches thank you deepak thank you sm thank you rithraj thank you sashi thank you vishal yes jyothi you can continue all the sessions are free of cost you don't need to take permission of anyone uh nagarjun if we declare a variable in one method that cannot be used in another method this is a good question so if you are creating a variable inside a method that you cannot use into another thank you ajit thank you praveen thank you sudhir so saida basically constructor we use to initialize class level variable so if you have class level variable then you can use constructor but generally we will be having method level variable method level variable means we will be creating variable inside the method so these three variables are method level variable so in this case you can convert your method into static and static methods we can call directly without a creation of instance this way so generally we will be preferring these this approach and whenever we we are learning apex so this will be a confusion like how actually this method will be called in real time so after three weeks when we'll be starting trigger so in trigger you will be understanding the uses of this like how actually we are calling apex methods methods into trigger so right now just focus like all the methods you will be defining in form of static and this is the way you will be calling them into anonymous window and you will be executing and there there was one one more question yesterday like what what is the use of this anonymous window so right now we are using anonymous window to run our apex classes and if you want to run your apex code here directly so that is also possible but the problem is whatever code you write here that you cannot save permanently okay so thank you pranay thank you amir sumit is asking freshers like me can't get jobs Salesforce for tissue no right now i am not providing any job support you just need to search job yourself vikash thank you mahesh thank you shubham okay shubham is asking explain this once again okay so i'm going to explain it again so i will be taking example of this so here for example you have class level variables length and breadth and here also you are using same variable name right so what happens both are having same name so class variable is same this constructor parameters are same so what you will do with class variables class variables you will be using this so that it can be distinguished so here you will be using this as a keyword so this is also a keyword so this way you can differentiate so this dot length means you are using this class variable so basically class variable you can use in any method and this is constructor variable or parameter that you are using here okay so in case of constructor generally we prefer this this keyword otherwise if you are using any method as static so in that case we don't prefer it thank you sk thank you rivithy thank you hossan onkar so apex trigger we will be understanding so right now we are understanding apex only so when we'll be understanding trigger so trigger is basically used to call the apex method right so whenever you will be creating the record you will be updating the record you will be deleting the record so in that case like in flow we created record triggered flow so similarly through code you will be triggering the apex methods so that we'll be learning later in the bootcamp yes sm mostly we will be passing parameters runtime thank you arjun thank you kirti thank you sanjeev so amary is asking what is it at the rate is test so that we'll be discussing when we'll be learning about apex test classes anti bro is asking can we use static variable we can but very less yes we can write data type directly in class and we are writing here as well so we are writing data type directly in class and we are creating variables this is also possible so jana for declaring variables so here you can see for variables i'm using first letter small if you see this example let's say here is active so is active is a variable so is is small i is small and active a is capital so this is the best practice thank you saida so very good is asking if i declare the variable at class level if it is private variable can i declare that variable in another method yes you can declare so if you declare a method in sorry variable in that method so preference will be given to that variable thank you sumit thank you shubham thank you rosegirl couple thank you yes couple so i just planned my sessions in such a way so that non-it background people can also understand and i can see many people are struggling with constructors so i would suggest just forget about constructor as of now later when you will be learning more about programming so you will be able to understand that as well because mostly we will be using static methods so just focus on that and i explained you it in four different ways so in in all these ways just try to practice all these ways so that you will be able to become expert so just watch this recording again because this recording is important yesterday's and today's both the recordings are important so if you have a little bit doubt so just go through once again so that you can understand so there's one more question if i declare the variable at class level if it is private can i declare no very goody for this question answer will be no if you are using static method then those class level variables you cannot use in static method thank you vanga thank you sobagya soji thank you rithuraj what is the limit of construct in a class there is no limit it is just to assign values into the class level variable thank you shiv thank you very goody thank you akula so if variables are declared as private so you can because these are class variables in in a class if you declare variable as private let's say here i write private okay so these are private to this class so here in in any method you can access them because they are local to class okay so this can be done shivani it is basically compiled apex code is compiled and then we actually execute it so whenever you save it is compiled automatically there is no other step so just write your code and save it it will be compiled automatically thank you dharini so such in list set and map we will be discussing on thursday shrikant i just explained void is a return type here so right now we are not using it directly it is available but we are not focusing on this much so later in examples i will be explaining it more clearly so right now you can just understand for example if we have more than one methods so from one method you can pass data to another method right so if you are passing data to different methods so what will happen your data can travel between methods so if you are passing value of one method into another so in that case what will happen you you will be using particular return type but if you are not returning any value to particular method so in that case you will be using void as a return type okay so right now we are not returning any value so that's why return type is void okay so few things you just need to remember few things you just need to remember because i can't explain each and everything in the beginning itself because some feature will be understood later in the sessions when actually we will be implementing those functionalities thank you sonu thank you angeli angeli saying i really appreciate your efforts as today is my first day to this session i don't understand about few things but still it was an amazing thank you so angeli you can go through yesterday's session recording is available in the excel sheet and session tracker link you can find from the description of this video so if you want to really follow the bootcamp so just follow all the sessions thank you satya for donating some amount i will surely buy a coffee this weekend thank you yes aji if you see the session tracker so in session tracker there are interview questions are available if you go here so you can see interview question answers link is available this is a youtube video playlist here all the interview related questions are available so i hope you are having link of this sheet if you don't have so i can just share it with you right away so this sheet is important where everything is available okay so angeli i just shared the link you can also use this link so that you can follow all the session so aji multiple inheritance is not supported because in that case we need to inherit two classes so that is not supported because of ambiguity so sudhir if we are writing starting method then we we are supposing we will not be creating instance and if we are not creating instance then there is no need of writing constructor yes nagarjun we can call one method into another that we will be understanding later on so jenna for data type first letter should be capital because data types are actually classes integer decimal boolean all these are classes and for class first letter is capital okay angeli yes all the links are available in the description of the video so please follow everything so that you can just understand the things well can we save two class with same name no sonu we cannot okay so i think i just answered each and every question so still if you have any questions so just ask in the comment section of the video otherwise just join the telegram group and discuss varun admin knowledge is required so if you have not gone through admin videos so i just shared the link of excel sheet just go through you have enough time just go through all the videos those are only 30 sessions so in 30 like 15 days if you target two sessions in a day so in 15 days you will cope up so along with these classes you can just go through because admin is the fundamental if you know those things then only you will be able to understand development properly and without admin knowledge development development doesn't make any sense okay so thank you so much everybody we'll connect tomorrow and discuss more features thank you everyone have a safe day