1 00:00:01,630 --> 00:00:02,570 Hi this is sharing. 2 00:00:02,640 --> 00:00:07,290 Howard Dean welcome to the next part of this video series of ended operability. 3 00:00:07,290 --> 00:00:10,530 Now in this video we will check out their demo. 4 00:00:10,610 --> 00:00:12,970 So here are the intelligent ID. 5 00:00:13,130 --> 00:00:17,310 I have my first dog guilty Plus right now is this. 6 00:00:17,330 --> 00:00:20,510 I am having a mean function now down the side. 7 00:00:20,510 --> 00:00:28,610 I will simply define one more function of add let's say and be of their type of n and then be of their 8 00:00:28,610 --> 00:00:29,850 type of end. 9 00:00:30,410 --> 00:00:34,010 And now this will simply return in value. 10 00:00:34,040 --> 00:00:41,470 So here I was simply return the sum of A-plus B which is actually the endangered value. 11 00:00:41,630 --> 00:00:50,510 Now here inside the source code I will simply create my java file scholar guys legacy my java file 12 00:00:53,420 --> 00:00:55,520 and make sure it is of the class. 13 00:00:55,570 --> 00:00:59,640 OK and this will simply create a public loss of my file. 14 00:00:59,810 --> 00:01:01,680 Now insert this ask for a job. 15 00:01:01,730 --> 00:01:09,920 We all know we have to define a public static void main method which is actually the entry point of 16 00:01:09,980 --> 00:01:15,060 any Java called string or Geass right now. 17 00:01:15,080 --> 00:01:21,740 If you compare my java files or Java and this my first dog guilty you will find the main method in both 18 00:01:21,740 --> 00:01:22,650 the keys. 19 00:01:22,820 --> 00:01:27,220 This is a main method and also here I have the main method now here. 20 00:01:27,350 --> 00:01:32,270 My objective is to call this argument third from inside my java file. 21 00:01:32,660 --> 00:01:40,160 But before that let us understand how Java is simply interpreted this fight so here after the code is 22 00:01:40,160 --> 00:01:47,030 compiled our the content of my first hundred guilty file will simply converted into this public class. 23 00:01:47,030 --> 00:01:53,870 My first get the right so by default we will get a clause inserted which we will have our main method 24 00:01:53,900 --> 00:01:55,750 and also the AG method. 25 00:01:55,820 --> 00:02:02,750 So here I was simply to find my main method as public static void main string is similar to what we 26 00:02:02,750 --> 00:02:04,980 have in case of my original file. 27 00:02:05,330 --> 00:02:12,350 So this method function main arguments at a string is actually converted into this when public static 28 00:02:12,350 --> 00:02:16,100 void main string energy is now similar to this. 29 00:02:16,100 --> 00:02:22,000 We also have an argument here that will be again converted into the Java syntax. 30 00:02:22,250 --> 00:02:28,570 So here we have the augmented public static in ag India and integer beat. 31 00:02:28,580 --> 00:02:30,850 So here I have the return type of end. 32 00:02:31,010 --> 00:02:33,240 And here we have the return type of end. 33 00:02:33,320 --> 00:02:36,010 Right here we have two meters. 34 00:02:36,110 --> 00:02:38,530 And here again we have to be meters. 35 00:02:38,690 --> 00:02:41,570 And again we are returning the sum of LSP. 36 00:02:41,620 --> 00:02:42,130 Right. 37 00:02:42,320 --> 00:02:46,610 So this is how the Java looks at these four lines of code. 38 00:02:46,670 --> 00:02:48,460 That is a function name and function. 39 00:02:48,460 --> 00:02:54,580 And now now since now we know that we're actually having this code internally. 40 00:02:54,770 --> 00:02:58,470 So from the Major I will file inside the main function. 41 00:02:58,490 --> 00:03:07,680 I can simply call let's see the name of the class Lerche see my first K-T dart class. 42 00:03:07,710 --> 00:03:08,160 Right. 43 00:03:08,250 --> 00:03:14,880 So this is actually the auto generated class name inside which we have two methods of large c mean and 44 00:03:14,920 --> 00:03:15,390 add. 45 00:03:15,720 --> 00:03:18,980 So the intellisense will simply show you these two options. 46 00:03:19,020 --> 00:03:23,100 So all our destiny is to call this method and let us call. 47 00:03:23,100 --> 00:03:27,940 Let's see three and four letters are these two numbers. 48 00:03:28,290 --> 00:03:34,260 And here I am simply following the Java syntax by adding a semi-colon to end the expression. 49 00:03:34,260 --> 00:03:39,160 Now let us use in some equal to this function. 50 00:03:39,510 --> 00:03:43,620 And now here I will simply print out such as system doled out. 51 00:03:43,650 --> 00:03:44,180 Got burned. 52 00:03:44,190 --> 00:03:50,800 Ellen printing some from the Javal file and simply print the value of the sum right. 53 00:03:51,010 --> 00:03:52,720 And now here are the top board. 54 00:03:52,720 --> 00:03:53,140 I really do. 55 00:03:53,140 --> 00:04:01,050 I would simply click on this icon to run the code simply in my java file got mean mattered and in the 56 00:04:01,070 --> 00:04:05,460 output we have printing some from Javal file as 7 right. 57 00:04:05,560 --> 00:04:13,270 So this is how we access a method inside the Cartland Plus from inside the Java class and now similarly 58 00:04:13,540 --> 00:04:17,990 can we access the Java metters from within the Cartland file. 59 00:04:18,010 --> 00:04:20,570 The answer to this is is not a force. 60 00:04:20,590 --> 00:04:30,170 If I define a method here let's say public static get edia offered a bangle large C and land and end 61 00:04:30,350 --> 00:04:37,370 but and then simply return L into B side. 62 00:04:37,510 --> 00:04:40,950 And now here I forgot to give the return type as in. 63 00:04:41,330 --> 00:04:48,530 And now this method can be accessed from inside the Garling file using the same syntax such as from 64 00:04:48,560 --> 00:04:50,040 inside the main method. 65 00:04:50,060 --> 00:05:02,570 I would simply call sorry that area equally to my java file which is our class name Dorte get area and 66 00:05:02,570 --> 00:05:08,590 assembly parts like Saillant as then and then bred as 5. 67 00:05:08,780 --> 00:05:16,360 And now here I would simply call Parentline printing area from the coffin file and now simply replace 68 00:05:16,360 --> 00:05:17,460 it by area. 69 00:05:17,470 --> 00:05:24,160 So here we are simply printing the area of the rectangle by calling a method present inside the file 70 00:05:24,160 --> 00:05:25,940 of dord job or failure. 71 00:05:26,110 --> 00:05:27,250 That is this file. 72 00:05:27,340 --> 00:05:34,420 Right and now later than an hour Kerguelen called so here simply click on it and simply click on it 73 00:05:34,420 --> 00:05:35,970 and my first duty. 74 00:05:36,160 --> 00:05:37,970 Like with any Cartland file. 75 00:05:40,750 --> 00:05:46,750 So in the outward Vigoda printing area from the Gorlin file that is fifty eight. 76 00:05:46,750 --> 00:05:52,960 So in this way we can have both Cartland and also the Javal file inside the same application. 77 00:05:53,200 --> 00:05:55,490 And now let us try something different. 78 00:05:55,510 --> 00:06:02,050 Now suppose from the Javal file we are actually using my first guilty which is the standard naming convention 79 00:06:02,140 --> 00:06:03,670 that the compiler followed. 80 00:06:03,670 --> 00:06:08,690 I had my first KTAR clause is getting converted during the completion. 81 00:06:08,740 --> 00:06:11,380 Now suppose if I use the syntax are there to help. 82 00:06:11,440 --> 00:06:23,190 Let's see our data file and then DVM name and as a parent meter Let's say you it a name as my custom 83 00:06:23,660 --> 00:06:24,680 Cartland find. 84 00:06:24,790 --> 00:06:32,130 But right now what happens is that the compiler will simply give this file name while converting into 85 00:06:32,130 --> 00:06:35,640 the byte code as my custom Cartland filename. 86 00:06:35,670 --> 00:06:41,800 Right now if you want to access these methods so what will happen is that instead of calling my first 87 00:06:41,820 --> 00:06:44,880 security you have to simply use this syntax. 88 00:06:45,010 --> 00:06:48,760 So Control-C and here Lichtenstein's that come in by this one. 89 00:06:49,320 --> 00:06:54,510 And now next inside my file you have to simply use it shows some error. 90 00:06:54,660 --> 00:06:59,320 So here you have to simply use my custom Cartland file name dot AG. 91 00:06:59,820 --> 00:07:06,810 So now onward our Codlin file is now having the wrapper of the class name of my custom Codlin filename 92 00:07:07,140 --> 00:07:10,290 which we have defined are the file level here. 93 00:07:10,740 --> 00:07:16,030 And now let us run our Java code by simply running the main function. 94 00:07:16,110 --> 00:07:19,860 So here we go printing some from the Javal file as 7 right. 95 00:07:19,860 --> 00:07:23,630 So the record is now working perfectly fine. 96 00:07:23,800 --> 00:07:25,660 And now Valter about the packages. 97 00:07:25,660 --> 00:07:30,390 Now this is these two files are actually present directly inside the source folder. 98 00:07:30,550 --> 00:07:40,310 Now if I want to create Lhotse a new package and Lipsey learned Scollard has gone toward my Java here. 99 00:07:40,350 --> 00:07:50,890 OK and now simply drag and drop this major VO file into this package resected and now here. 100 00:07:50,940 --> 00:07:54,510 If you notice inside the mind my devil find are Java here. 101 00:07:54,540 --> 00:07:57,380 I have the package of gone Daut my Java. 102 00:07:57,540 --> 00:08:00,330 So this file is now a part of this package. 103 00:08:00,480 --> 00:08:06,380 And now here does create one will package and it a scholar has gone. 104 00:08:06,390 --> 00:08:10,350 Got my Cartland will be restored. 105 00:08:10,360 --> 00:08:19,130 All our Codling fails and I simply drag and drop the curtain in-phase inside my Cartland package and 106 00:08:19,130 --> 00:08:25,230 then in fact it so inside my first d'arte Katie. 107 00:08:25,430 --> 00:08:28,080 You will find the package name has gone dark. 108 00:08:28,100 --> 00:08:31,320 My Cartland And now if you are busy. 109 00:08:31,460 --> 00:08:34,570 Here we are simply imported the package of Gorme dog. 110 00:08:34,610 --> 00:08:36,740 My java dog my java file. 111 00:08:36,770 --> 00:08:37,720 So here goes. 112 00:08:37,720 --> 00:08:40,260 Remove it as of now and let's see what happens. 113 00:08:40,400 --> 00:08:46,700 So here it simply shows some error and resolve file late undesired class name. 114 00:08:46,700 --> 00:08:48,940 So here I will simply press it. 115 00:08:49,220 --> 00:08:56,590 Now whenever there is some error in case of intelligent Id simply place or take place and work on it. 116 00:08:56,620 --> 00:08:58,790 Let's enter and hit on import. 117 00:08:59,060 --> 00:09:06,230 So the endless ID will simply import the required package for you and now Next inside major I will file 118 00:09:06,880 --> 00:09:07,330 again. 119 00:09:07,370 --> 00:09:10,410 We have some error cannot resolve this last name. 120 00:09:12,080 --> 00:09:13,310 So again Vawter do. 121 00:09:13,400 --> 00:09:14,580 Simply replace it. 122 00:09:14,610 --> 00:09:21,650 And so here I have that complete import package has gone Dord my Cartland Dord make us from Codling 123 00:09:21,740 --> 00:09:30,750 filename right and now if you run the code then also the cord will work perfectly fine in both the files. 124 00:09:30,780 --> 00:09:31,560 So here we go. 125 00:09:31,560 --> 00:09:38,530 Our code is still working perfectly fine so this is how we actually create the packages in case of Cartland. 126 00:09:38,670 --> 00:09:44,070 And we can store both the java file and also the Cartland file within the same application. 127 00:09:44,250 --> 00:09:46,020 So this is how we are going to work. 128 00:09:46,020 --> 00:09:47,780 In case of Android as well. 129 00:09:47,940 --> 00:09:51,750 So thanks for watching and have a good day and see you guys in the next video. 130 00:09:51,750 --> 00:09:52,260 Thank you.