1 00:00:01,590 --> 00:00:06,750 Heidi's history and start and really come to the next topic of discussion that is in operability in 2 00:00:06,750 --> 00:00:12,810 case of Cartland Now this is going to be the most interesting part of this series of Cartland programming 3 00:00:13,170 --> 00:00:18,780 now at the very beginning of this series I told you that in supports in that operability. 4 00:00:18,780 --> 00:00:20,320 Now what does this means. 5 00:00:20,370 --> 00:00:26,110 This means that you can simply call any job function from the Cartland and vice versa. 6 00:00:26,160 --> 00:00:29,980 That is you can call the Cartland functions from the job will fail. 7 00:00:30,330 --> 00:00:36,820 This simply means that you can have both Java and Cartland files present inside your same application. 8 00:00:37,620 --> 00:00:44,900 So how does this work actually so far that you have to first understand this thing how a Java cauldrons 9 00:00:45,170 --> 00:00:49,250 now the whole process is actually divided into two parts. 10 00:00:49,250 --> 00:00:55,970 The first is the compile time and the second part is the runtime not doing the compile time the compiler 11 00:00:56,540 --> 00:01:01,910 simply converts you to a java file that contains the Java code into the bytecode. 12 00:01:01,910 --> 00:01:07,810 Now this bytecode is actually stored inside the file which has the extension of Dorte class. 13 00:01:07,820 --> 00:01:14,510 So here I have my moods are Java and here I have made a model class that simply contains the bytecode 14 00:01:14,810 --> 00:01:20,810 which is a more refined form of the code which is actually understandable by the Java virtual machine. 15 00:01:20,810 --> 00:01:26,840 So the Java virtual machine with the help of some other libraries simply makes your code execute and 16 00:01:26,840 --> 00:01:29,570 hence your program is now up and running. 17 00:01:29,630 --> 00:01:32,460 Now what happens in case of Cartland. 18 00:01:32,650 --> 00:01:38,990 Now in case of Cartland the whole process is again divided into the compile time and runtime. 19 00:01:38,990 --> 00:01:43,400 Now in case of compile time we have made they more guilty. 20 00:01:43,460 --> 00:01:49,910 We have dord give the extension file simply contains the Cartland called similar to what we have here 21 00:01:49,910 --> 00:01:51,190 is Java code. 22 00:01:51,350 --> 00:02:00,620 Now the Cartland compiler simply converts the K-T file extension into my dark class simply contains 23 00:02:00,710 --> 00:02:01,940 the bytecode. 24 00:02:01,940 --> 00:02:09,180 Now here you can notice I have made my more dog Katie so the class file name is actually made the more 25 00:02:09,180 --> 00:02:11,230 guilty dog class. 26 00:02:11,240 --> 00:02:16,940 This is the standard naming convention in case of Codlin when the compiler converts this file into the 27 00:02:16,940 --> 00:02:18,230 byte called. 28 00:02:18,230 --> 00:02:21,220 Now this file contains the byde called trade. 29 00:02:21,380 --> 00:02:24,380 So here if you compare the both side you will find. 30 00:02:24,380 --> 00:02:29,210 Here we have it called and again in case of Cartland we have the byte called. 31 00:02:29,210 --> 00:02:35,720 Now since we have bytecode in both the forms now this byte called in the runtime will be executed with 32 00:02:35,720 --> 00:02:37,800 the help of a Java virtual machine. 33 00:02:37,940 --> 00:02:41,450 And then your program will be now up and running. 34 00:02:41,480 --> 00:02:45,610 So this is how our typical Java code runs and the Codlin cauldrons. 35 00:02:45,770 --> 00:02:52,430 So now if you notice in Buddh the case we are having the bytecode right and now proceeding forward let 36 00:02:52,420 --> 00:02:52,760 us know. 37 00:02:52,760 --> 00:02:56,910 Check out How does our typical Cartland file or code looks like. 38 00:02:57,110 --> 00:03:00,260 So what we see inside the Cartland file is this. 39 00:03:00,260 --> 00:03:06,680 Now suppose our Karleen file has a name of my first darte gayeties stored inside the source for it. 40 00:03:06,920 --> 00:03:08,180 And here is our code. 41 00:03:08,180 --> 00:03:16,610 Suppose I have a method of function and that takes a bit of a in danger and simply returns a boolean 42 00:03:16,730 --> 00:03:19,310 value and this is the method Bartie. 43 00:03:19,370 --> 00:03:26,210 Now are the High-Level we actually see discord right now what happens after the compiler can do that. 44 00:03:26,230 --> 00:03:28,230 My first daughter gave the file. 45 00:03:28,400 --> 00:03:36,710 Now soon after the completion this file is actually converted into my first grade art class right and 46 00:03:36,780 --> 00:03:43,970 then vord the compiler do is that I simply add the wrapper off class on top of this function. 47 00:03:44,060 --> 00:03:44,970 So don't leave. 48 00:03:44,980 --> 00:03:53,030 What happens is that discord is actually converted into discord such as I have now plus my first guilty 49 00:03:53,220 --> 00:03:58,160 raid inside which I have public static boolean add in a. 50 00:03:58,310 --> 00:04:04,320 Now if you compare this method and this method you will notice that this is the High-Level method. 51 00:04:05,270 --> 00:04:09,830 In case of Portland and now this is typical method in case of Java. 52 00:04:09,980 --> 00:04:16,340 So we have public stocktake now Bideford all the metrics in queues of Cortland are actually public in 53 00:04:16,340 --> 00:04:17,090 nature. 54 00:04:17,090 --> 00:04:21,570 So we have public care now since this method is a high level method. 55 00:04:21,710 --> 00:04:24,180 So it has been converted to this tactic. 56 00:04:24,200 --> 00:04:24,660 Right. 57 00:04:24,800 --> 00:04:27,220 And here we have a boolean return type. 58 00:04:27,350 --> 00:04:29,860 So again we have a boolean return type. 59 00:04:30,020 --> 00:04:33,680 And this is a method name with NBG a barometer. 60 00:04:33,740 --> 00:04:37,590 And now inside this we have an amateur Barbie. 61 00:04:37,610 --> 00:04:43,250 So what we see in dentally does not appear to be the same after the code is compiled. 62 00:04:43,280 --> 00:04:43,930 Right. 63 00:04:44,270 --> 00:04:50,690 So now since we know the internal structure of the my first KTAR class so this good can be called from 64 00:04:50,780 --> 00:04:52,160 any of the java file. 65 00:04:52,180 --> 00:04:59,100 It is an inside job application so how can we access the Cartland file from Javal file. 66 00:04:59,100 --> 00:05:05,160 They will check out in the next video so please make sure you watch my next video because it is a very 67 00:05:05,160 --> 00:05:07,460 important part of discourse. 68 00:05:07,620 --> 00:05:09,310 So see you guys in the next video. 69 00:05:09,330 --> 00:05:09,870 Thank you.