Speaker A
So plus is one of the operators. So here plus is one operator which will perform addition of two numbers. And what about this equal to? Equal to is also an operator. Equal to also one of the operators. So what equal to will do here, once a plus b is added, the result will be stored into this variable. So who is assigning the result into this variable? Equal to. So equal to is called assignment operator. Okay, so here plus also equal. So these are all called operators. And what is a and b initially before using this expression? A and B are just variables. Now once you use those variables inside the expression, we call them as operands. A, comma, B called as operand. So the variables which are participated inside this expression along with the operators, they are called operand. Okay, so operator means what? It is a symbol which will perform an operation, which will perform an, it can be any type of operation. Here plus is one of the examples. Plus will do the addition operation. Equal to will do the assignment operation. So whatever value we have here 10 will assign to the a. Who is doing that? Equal to is doing it. Same thing 20 is assigning into the b. So equal to is doing that which is also an operator. And here plus is an operator which will perform addition of these two numbers and storing the result into variable is again by equal to stored the result in the result variable. Okay, so operator means a symbol which will perform an operation. The variables which are participate inside this expression, we call them as operands. Before using here, just they are the variables, but once you started using the variables inside this expressions along with operators, we call it as an operand. Okay, now in Java, there are various types of operators are provided. So let me just list out here types of operators. So to perform any type of operation, we have to use different types of operators. Now what are the different types of operators provided by Java? There are n number of operators. Mainly we will use these six types of operators very commonly. So the first category, arithmetic operators. There are five operators comes under this category. One is plus, minus, star, slash, and percent. Okay, these are all called arithmetic operators. And relational or comparison operators, second category, relational or comparison operators, greater than, greater than or equal to, less than, less than or equal to, not equal to, double equal to. So these are all comes under relational or comparison and operators. Then logical operators, and or not, three operators which are comes under logical operators. And plus plus is called increment operator, minus minus is called decrement operator. I will show you demonstration how can we use these all operators. So plus plus is increment operator, minus minus is a decrement operator, and equal to is an assignment operator. We already discussed which will assign some data to the variable. So like this, we have some more assignment operators like plus equal to, minus equal to, star equal to, slash equal to, percent equal to. These are all assignment or we can also call as shorthand operators. And conditional or ternary operator, question mark colon, one operator. Question mark colon is one single operator which is conditional or ternary operator. So totally these are the six types of operators which we are going to discuss. So first thing, let us start with arithmetic operators. Let's go to Eclipse and go to our project. So let's create a new package for today. I can create by click on SRC, new package. I say day three, click on finish. So now we created a new package. So inside this, I'm going to create a new class.