1
00:00:00,810 --> 00:00:05,040
So as you can see here these are the lines of code that they actually pasted here.

2
00:00:05,250 --> 00:00:11,740
So first of all in line 60 the I created a variable of type integer called Aure element.

3
00:00:11,760 --> 00:00:12,610
OK.

4
00:00:13,050 --> 00:00:16,940
And here I actually put in an assignment operator here.

5
00:00:17,160 --> 00:00:20,400
And then I referred to the name of this class.

6
00:00:20,580 --> 00:00:24,960
And here I called this method to this class had on this race class here.

7
00:00:24,960 --> 00:00:25,430
OK.

8
00:00:25,440 --> 00:00:27,810
So ARA is that binary search.

9
00:00:27,900 --> 00:00:30,060
So this river is going to actually return.

10
00:00:30,230 --> 00:00:30,780
OK.

11
00:00:31,000 --> 00:00:37,240
Are specific actually element for that value that we actually specify for this method.

12
00:00:37,260 --> 00:00:38,050
OK.

13
00:00:38,400 --> 00:00:44,270
So this it is going to return a specific element inside of the array that we specify for this method.

14
00:00:44,400 --> 00:00:47,870
So here we refers to the name of these double values array.

15
00:00:47,990 --> 00:00:48,490
OK.

16
00:00:48,660 --> 00:00:54,030
And we want this specific element that actually this value refers to.

17
00:00:54,030 --> 00:00:54,630
OK.

18
00:00:54,930 --> 00:01:00,270
So for example we have and we have these global values right here as you can see.

19
00:01:00,540 --> 00:01:03,960
And this number two point seven as you can see is here.

20
00:01:04,020 --> 00:01:04,540
OK.

21
00:01:04,710 --> 00:01:09,860
We want the specific element the specific index that this value actually first.

22
00:01:09,900 --> 00:01:16,340
OK so now let's actually as you can see here is in line 61.

23
00:01:16,470 --> 00:01:19,640
I actually created an if statement here.

24
00:01:19,730 --> 00:01:20,210
OK.

25
00:01:20,220 --> 00:01:29,430
If the value of this every element is equal is actually greater than or equal to number 0 then the location

26
00:01:29,520 --> 00:01:36,970
of every element that set text and here actually referred to the name of this string class data format.

27
00:01:37,200 --> 00:01:42,580
OK string data formats we've found 2.7 at element.

28
00:01:42,600 --> 00:01:42,990
OK.

29
00:01:43,050 --> 00:01:45,010
Or add index percent.

30
00:01:45,030 --> 00:01:49,860
So this token actually refers to this argument as you can see here.

31
00:01:49,920 --> 00:01:56,310
And this token is actually related to this argument and here as you can see I put a plus operator here

32
00:01:56,310 --> 00:02:00,580
in order to concatenate this value with this value in double values array.

33
00:02:00,990 --> 00:02:03,050
And here I put in a comma here and here.

34
00:02:03,060 --> 00:02:06,950
As you can see I actually put in an argument of type integer OK.

35
00:02:07,170 --> 00:02:11,180
So this token is actually related to this element argument here.

36
00:02:11,270 --> 00:02:12,180
OK.

37
00:02:12,480 --> 00:02:15,990
And then I put in an else statement here else.

38
00:02:16,080 --> 00:02:23,250
So this means if the value of this element is actually less than the value of this zero here else takes

39
00:02:23,250 --> 00:02:28,770
the location of the element that text that said text couldn't find the value in that element.

40
00:02:28,770 --> 00:02:32,710
I think this is Runk couldn't find the value in that houri.

41
00:02:32,790 --> 00:02:37,170
OK so now let's actually run our project and see what happens.

42
00:02:37,170 --> 00:02:42,310
So now as you can see our application is running on this emulator here.

43
00:02:42,750 --> 00:02:45,930
And it says the location of our every element here.

44
00:02:45,990 --> 00:02:53,150
We found a number 2.7 at 12:49 one cannot see the other values here.

45
00:02:53,220 --> 00:02:55,620
We can see these are in double values.

46
00:02:55,980 --> 00:02:59,990
So here let's actually go back inside these content underline minute example.

47
00:03:00,000 --> 00:03:08,220
So now here inside of this content underline mean exam and let's actually select our vertical scroll

48
00:03:08,220 --> 00:03:13,720
view here as you can see inside of these containers folder we have a vertical scroll view here.

49
00:03:13,740 --> 00:03:18,730
OK just select this and put it inside this linearly as vertical here.

50
00:03:18,810 --> 00:03:19,610
OK.

51
00:03:20,040 --> 00:03:26,780
And let's actually just select the location element takes view as you can see here and put it's OK to

52
00:03:26,800 --> 00:03:29,980
select it and put it inside this scroll view here.

53
00:03:30,090 --> 00:03:31,360
OK.

54
00:03:31,400 --> 00:03:35,130
Well actually this is a vertical scroll view.

55
00:03:35,140 --> 00:03:39,540
OK so now let's actually run our project and see what happens.

56
00:03:39,540 --> 00:03:46,740
So as you can see our application is running on this emulator here and here as you can see it says we

57
00:03:46,740 --> 00:03:51,350
found the number two point seven element 1 in.

58
00:03:51,360 --> 00:03:58,080
So let's actually scroll down here scroll down to scroll view here as you can see I can scroll Now scroll

59
00:03:58,080 --> 00:03:58,720
here.

60
00:03:58,830 --> 00:04:00,210
Now we can see the other values.

61
00:04:00,210 --> 00:04:00,710
OK.

62
00:04:00,900 --> 00:04:06,470
So we found number 2.7 at element 1 in double values.

63
00:04:06,500 --> 00:04:08,370
Ari OK.

64
00:04:08,580 --> 00:04:12,990
So now you may wonder why this value is actually an index.

65
00:04:12,990 --> 00:04:14,870
One of these r.e.

66
00:04:14,940 --> 00:04:15,430
OK.

67
00:04:15,540 --> 00:04:20,320
So as you can see here let's actually go back inside these main activity the Ajo of phi here.

68
00:04:20,340 --> 00:04:23,890
As you can see this number is actually an index.

69
00:04:23,930 --> 00:04:27,920
This is index 0 index one index to inexpertly.

70
00:04:27,990 --> 00:04:30,860
OK so this value is actually an index free.

71
00:04:30,920 --> 00:04:31,910
OK why.

72
00:04:31,920 --> 00:04:36,620
Here it says we found our number 2.7 at element 1.

73
00:04:36,690 --> 00:04:37,000
OK.

74
00:04:37,000 --> 00:04:38,240
Why why this happened.

75
00:04:38,310 --> 00:04:47,970
Because here as you can see in line in line 41 we actually arranged our double values in an ascending

76
00:04:48,000 --> 00:04:48,630
order.

77
00:04:48,630 --> 00:04:49,120
OK.

78
00:04:49,350 --> 00:04:55,110
So here if we actually show you that this is an array of double values here you can see that these values

79
00:04:55,440 --> 00:04:58,300
are arranged in an actually ascending order.

80
00:04:58,350 --> 00:04:58,810
OK.

81
00:04:58,920 --> 00:05:06,150
So here you can see this while you are these numbers 2.7 is actually at index one of these at.

82
00:05:06,190 --> 00:05:15,070
So here as you can see that's why it actually says we found number 2.7 at element 1 in double values

83
00:05:15,090 --> 00:05:15,420
at a.

84
00:05:15,460 --> 00:05:16,690
Ok this is index one.

85
00:05:16,720 --> 00:05:19,090
So hopefully that makes sense.

86
00:05:19,090 --> 00:05:24,070
And I think that's enough for this tutorial.

87
00:05:24,310 --> 00:05:30,580
And if you have any questions please post the discussion in the course and then I'll do my best to answer

88
00:05:30,610 --> 00:05:32,330
all of your questions.

89
00:05:32,320 --> 00:05:36,550
And thank you very much for watching and I'll see you in the next tutorial.

