1

00:00:01,000  -->  00:00:06,970
We just completed the chapter on that we must have completed around 70 percent of the language business

2

00:00:07,710  -->  00:00:08,660
in this chapter.

3

00:00:08,710  -->  00:00:14,530
We studied about the court building blocks of matter like operators unconfrontable segments which are

4

00:00:14,530  -->  00:00:17,230
useful in building meaningful logic.

5

00:00:17,230  -->  00:00:22,300
We also have that variable scoping rules which is different building the program a particular variable

6

00:00:22,300  -->  00:00:23,880
can be used.

7

00:00:23,920  -->  00:00:26,980
Now let's look at some of the important points we covered in this chapter.

8

00:00:28,740  -->  00:00:34,200
That began with Artomatic operators which are applicable only on primitive numeric types.

9

00:00:34,480  -->  00:00:40,610
That is to apply to all primitives except boolean one exception must bless all pricker which can also

10

00:00:40,610  -->  00:00:43,110
be used for concatenating strings.

11

00:00:43,100  -->  00:00:50,760
Vitruvian look at when discussing strings we also look at few important rules that may come into play

12

00:00:50,850  -->  00:00:53,370
when using Artomatic operations.

13

00:00:53,400  -->  00:00:55,660
First one is operator precedence.

14

00:00:56,100  -->  00:01:01,470
It is useful when an expression involves multiple operators on the order in which operations should

15

00:01:01,470  -->  00:01:08,550
be applied is not clear from the expression in this case rules could be applied to frustrate gives preference

16

00:01:08,550  -->  00:01:12,480
to multiplicative operations or are they do operations.

17

00:01:12,480  -->  00:01:18,040
Second rule is that operate within the same group will be evaluated from left to right.

18

00:01:19,020  -->  00:01:21,210
Next role was open and promotional.

19

00:01:21,810  -->  00:01:28,980
And according to this rule operate in smaller than AInc data type are promoted in third rule is that

20

00:01:29,220  -->  00:01:35,070
if both our parents are of same type then the final value of the operation will also be of the same

21

00:01:35,070  -->  00:01:42,790
type as the two options find you is that if both operands belong to different types then the value of

22

00:01:42,790  -->  00:01:46,810
the smaller type is automatically promoted to larger readership.

23

00:01:47,730  -->  00:01:50,950
These rules are very important especially the last two.

24

00:01:51,360  -->  00:01:57,480
Sometimes developers are not aware of these rules and consequently they are never clear on why certain

25

00:01:57,510  -->  00:02:00,260
art expressions produce certain reasons.

26

00:02:01,860  -->  00:02:03,360
Next will look that comparison.

27

00:02:03,370  -->  00:02:11,360
Unlogical operators comparison operators compare one opening with another and there are also two foot

28

00:02:11,360  -->  00:02:16,410
lessoned relational operators there are several comparison operators.

29

00:02:16,410  -->  00:02:22,320
But if you want to check whether you object references or reference the same object or not then we can

30

00:02:22,320  -->  00:02:25,650
use equal do not equal to operators.

31

00:02:25,650  -->  00:02:31,650
These operators are also useful for performing null checks and avoiding runtime errors like multi-point

32

00:02:31,650  -->  00:02:32,530
or exception.

33

00:02:34,100  -->  00:02:35,680
Logical operators are useful.

34

00:02:35,860  -->  00:02:39,320
If you want this money to bail conditions to perform some action.

35

00:02:40,600  -->  00:02:48,530
An among the logical operations and an auto operators are shops so good operators next we look that

36

00:02:48,550  -->  00:02:55,420
big rise and big shift operators which operate at big Levan you may never use them unless you're doing

37

00:02:55,420  -->  00:02:58,110
some low level complex programming work.

38

00:02:59,870  -->  00:03:06,620
Both of them are especially useful in resource constrained applications because operators operate on

39

00:03:06,680  -->  00:03:11,310
only integer and boolean parameters they're used with Boolean is pretty rare.

40

00:03:11,440  -->  00:03:17,920
And so they are mostly seen with integer primitives you've got what it does on the other hand operate

41

00:03:17,980  -->  00:03:23,760
only on indigent primitives on the shift bench on either right or left direction.

42

00:03:25,360  -->  00:03:29,330
Left shift operator response do multiplication by Bell or softball.

43

00:03:30,300  -->  00:03:36,890
While unsigned right shift operator response or division by power or software such bit shifting is much

44

00:03:36,890  -->  00:03:41,260
faster than performing multiplication and division and hence they are useful.

45

00:03:41,260  -->  00:03:42,820
Their performance is critical.

46

00:03:44,670  -->  00:03:50,150
Unhitched are some obligations of these operators if you recall because because the Djala use this is

47

00:03:50,180  -->  00:03:56,510
all it goes and it's Hashima structure which is an implementation of Hosty and specifically it is used

48

00:03:56,510  -->  00:04:01,460
in something called hash function hash map and has tables that will be discussed when we are covered

49

00:04:01,460  -->  00:04:02,610
in data structures.

50

00:04:04,290  -->  00:04:11,610
After all but it does believe it can go for all segments and switch treatment was one of them one important

51

00:04:11,610  -->  00:04:18,330
thing about switches that the switch expression which is used in parentheses has to be an integer string

52

00:04:18,380  -->  00:04:21,240
are in them so it cannot be anything else.

53

00:04:22,730  -->  00:04:28,850
And one important question we are just going to prefer switch statement or an IF statement.

54

00:04:29,180  -->  00:04:32,960
And here are some possible reasons for you to consider using it switch.

55

00:04:33,860  -->  00:04:36,600
One reason as if it improves readability.

56

00:04:37,690  -->  00:04:39,010
Next is in debt.

57

00:04:39,580  -->  00:04:45,060
That is by using a switch program that is deliberately making a statement that only one variable is

58

00:04:45,090  -->  00:04:51,830
inborn finally speed due to the way it is internally implemented it switches faster than if.

59

00:04:52,330  -->  00:04:58,060
If there are too many conditions to dust then you may want to use a switch you can use a profiler like

60

00:04:58,080  -->  00:05:01,590
Gabe profiler and it can help you in making this decision.

61

00:05:03,230  -->  00:05:05,870
We also looked at the recommendation from effective Java.

62

00:05:06,160  -->  00:05:13,850
And it is item 46 and it said prefer for each nubes traditional for Loeb's specific do it did it in

63

00:05:13,850  -->  00:05:15,970
data structures like ours.

64

00:05:16,040  -->  00:05:21,700
It provides a billion nursing backs as it hides some of the expressions used in a conditional statement

65

00:05:22,220  -->  00:05:25,950
like the condition expression under expressionless parts.

66

00:05:25,970  -->  00:05:28,710
This also reduces opportunities for errors.

67

00:05:29,240  -->  00:05:33,610
So don't use traditional font lobes unless you need access to the index variable.

68

00:05:35,020  -->  00:05:42,320
Finally Gendron briefer for loops over my nerves this is also recommended by one off the two dull items

69

00:05:42,480  -->  00:05:43,940
that will be discussed later.

70

00:05:44,770  -->  00:05:46,120
And that's about it.

71

00:05:46,120  -->  00:05:51,190
Thanks for listening and we'll continue learning more language basics in the next chapter.

72

00:05:51,550  -->  00:05:53,590
So see you in the next chapter.

73

00:05:53,590  -->  00:05:54,390
Thank you.
